Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------Задание 1
- ; multi-segment executable file template.
- data segment
- ; add your data here!
- pkey db "press any key...$"
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- ; set segment registers:
- mov ax, data
- mov ds, ax
- mov es, ax
- ; add your code here
- mov ax, 0
- mov bx, 0
- mov cx, 0
- mov ah, 140
- mov al, 10
- mov bx, ax
- mov cx, ax
- add ax, bx
- lea dx, pkey
- mov ah, 9
- int 21h ; output string at ds:dx
- ; wait for any key....
- mov ah, 1
- int 21h
- mov ax, 4c00h ; exit to operating system.
- int 21h
- ends
- end start ; set entry point and stop the assembler.
- //--------------------------------------Задание 2
- ; multi-segment executable file template.
- data segment
- ; add your data here!
- tabl1 db 10, 20, 30, 40
- tabl2 db 0, 0, 0, 0
- pkey db "press any key...$"
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- ; set segment registers:
- mov ax, data
- mov ds, ax
- mov es, ax
- ; add your code here
- mov al, tabl1
- mov tabl2 + 3, al
- mov al, tabl1 + 1
- mov tabl2 + 2, al
- mov al, tabl1 + 2
- mov tabl2 + 1, al
- mov al, tabl1 + 3
- mov tabl2, al
- lea dx, pkey
- mov ah, 9
- int 21h ; output string at ds:dx
- ; wait for any key....
- mov ah, 1
- int 21h
- mov ax, 4c00h ; exit to operating system.
- int 21h
- ends
- end start ; set entry point and stop the assembler.
Add Comment
Please, Sign In to add comment