setCursor macro x,y mov ah, 2 mov bh, 0 mov dl, x mov dh, y int 10h endm clearscreen macro color ,x,y,lastx,lasty mov ax, 0600h mov bh, color mov ch, x mov cl, y mov dh, lastx mov dl, lasty int 10h endm printString macro str mov ah,9 lea dx, str int 21h endm printNum macro num mov ah, 2 mov dl, num add dl, 48 int 21h endm inputNum macro mov ah,1 int 21h endm space macro mov ah,2 mov dl,20h int 21h mov [bx+di], dl inc di endm isEvenorOdd macro num mov al, num cmp al, 20h je exit sub al, 48 div temp cmp ah,0 je countEven inc oddCtr jmp short exit countEven: inc evenCtr exit: endm backSpace macro mov ah,2 mov dl, 20h int 21h dec di mov temp2, 10h add temp2, di mov ah, 2h mov bh,0h mov dh,0h mov dl, temp2 int 10h cmp temp2, 0Fh je _start jmp input endm