colliding stars in assembly language programming

[org 0x0100]
mov bx,160
mov ax, 0xb800
mov es, ax

start:
mov di, 0
mov ax,12
mul bx
mov si,ax

mov di,ax
add si,158



next:
push di
mov di,0
call nextchar
pop di
mov word [es:di], 0x072A
mov word [es:si], 0x072A
call looper
add di,2
sub si,2
cmp di,2000
je next2
jmp next


next2:
push di
mov di,0
call nextchar
pop di
mov word [es:di], 0x072A
mov word [es:si], 0x072A
call looper
sub di,2
add si,2
cmp di,1920
je next
jmp next2

nextchar:
mov word [es:di], 0x0720
add di, 2
cmp di, 4000
jne nextchar
ret

looper:
mov cx,0
redo:
cmp cx,4000
add cx,1
je retr
jmp redo
retr:
ret
mov ax, 0x4c00
int 0x21

Comments

Popular Posts