.386 include irvine16.inc .data array byte 10 dup(?) ten word 10 prompt byte "Enter something: ", 0ah, 0dh, "$" .code start Proc mov ax, @data mov ds, ax mov ah, 9 mov dx, offset prompt int 21h ;message to the user ;read in a number ;work on this part xor bx, bx ;set bx=0 ;between here mov ax, bx xor si, si ;si=0 getnumtop: cmp ax, 0 je printit xor dx, dx ;dx =0 div ten or dl, 48 mov array[si], dl add si, 1 ;increment si jmp getnumtop printit: cmp si, 0 jL getdigit mov ah, 2 ;2 is dos interrupt for printing mov dl, array[si] int 21h dec si ;decrement si jmp printit getdigit: sub al, 48 cmp al, 9 jbe gotdigit sub al, 7 gotdigit: add al, 45 exit start endp end start
I really don't know where to go from here, I know there are probably some terrible errors, and its obviously not finished. I'd really like to understand this better and would appreciate any and all help. Thank you.