Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- init macro d_name
- push ds
- xor ax, ax
- push ax
- ifnb <d_name>
- mov ax, d_name
- mov ds, ax
- endif
- endm
- s segment stack 'stack'
- dw 64 dup(?)
- s ends
- d segment 'data'
- syms db 65,65,65,65,65,32,32,65,65,65,65,65, '?'
- syms1 db 32,32,32,32,32,32,32,32,32,32,32,32, '?'
- kursor db 0, 0, 0, 1, 0, 2, 0, 3, 1, 0, 1, 1, 1, 2, 1, 3, 2, 0, 2, 1, 2, 2, 2, 3
- d ends
- c segment 'code'
- assume ss:s, cs:c, ds:d
- main proc far
- init d
- mov dx, 1016h
- push dx
- Call print
- Call paus
- push dx
- Call print1
- mov dx, 1020h
- push dx
- Call print
- ret
- main endp
- paus proc near
- push cx
- mov cx, 0fh
- l3: push cx
- mov cx, 0ffffh
- l2: loop l2
- pop cx
- loop l3
- pop cx
- ret
- paus endp
- print proc near
- push bp
- mov bp, sp
- mov dx, [bp + 4]
- push si di
- xor si, si
- xor di, di
- l: cmp byte ptr syms[si], '?'
- Je ver
- push dx
- add dh, kursor[di]
- add dl, kursor[di + 1]
- mov ah, 2
- int 10h
- mov dl, syms[si]
- mov ah, 2
- int 21h
- inc si
- inc di
- inc di
- pop dx
- Jmp l
- ver: pop di si
- pop bp
- ret 2
- print endp
- print1 proc near
- push bp
- mov bp, sp
- mov dx, [bp + 4]
- push si di
- xor si, si
- xor di, di
- l1: cmp byte ptr syms1[si], '?'
- Je ver1
- push dx
- add dh, kursor[di]
- add dl, kursor[di + 1]
- mov ah, 2
- int 10h
- mov dl, syms1[si]
- mov ah, 2
- int 21h
- inc si
- inc di
- inc di
- pop dx
- Jmp l1
- ver1: pop di si
- pop bp
- ret 2
- print1 endp
- c ends
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement