Here is my awful attempt at converting this:
int a=0;
if(a!=80)
{
a+=1;
}
to assembly (NASM):
push cx
mov cx, 80
loop:
je short endloop
mov al,0xDB
call kputchar
add word [d],1
cmp cx,[d]
endloop:
pop cx
...
d dw 0
I am not very good at ASM, so any help would be much appreciated. TIA