DAseg Segment
Org 100h
Assume CS:DAseg, SS:DAseg, DS:DAseg
Start: jmp short begin
chartab db 07Ch, 0C6h, 0CEh, 0DEh, 0F6h, 0E6h, 07Ch, 000h; '0'
db 0
Startpos dw 0306h
Begin:
mov bx, 0
mov dx, startpos
lea di,chartab
mov ah, 2; set cursor
int 10h
mov ch,08h; ch-external
m0:
mov cl,08h; cl-internal
mov al, byte ptr [di]
inc di
m1:
shl al,1
push ax
jc m2
mov al,'.'
jmp m3
m2:
mov al,'$'
m3:
mov ah, 0Eh; teletype
int 10h
pop ax
dec cl
cmp cl,0
jnz m1
inc dh
mov ah, 2; set cursor
int 10h
dec ch
cmp ch,0
jnz m0
Mov AX,4C00h
Int 21h
DAseg EndS
End Start
Макросы в Ассемблере., оформить Teletype как макрос |