View Single Post
Old May 28th, 2007, 1:40 AM   #1
teencoder
Hobbyist Programmer
 
teencoder's Avatar
 
Join Date: Jul 2005
Posts: 158
Rep Power: 0 teencoder is an unknown quantity at this point
Help with simple program

Okay I'm done with school for a while and I decided to toy with systems programming after a crash course in assembly I decided to try something. The program boots but doesn't execute properly. I've examined my code but I haven't found any problem. So if you could help me I'd really appreciate. It was assembled in NASM.
[BITS 16]
ORG 0
mov AH,0x0
mov AL,0x0
int 0x10; enter 40x25 B/W text video mode
continue:
int 0x16;read key strokes
cmp AH,0x1C0D;test for an enter key stroke
je exit
mov AL,AH
int 10;display character
jmp continue
exit:
mov AH,0x0
int 19;warm boot
times 510-($-$$) db 0x0;fill up empty bytes
dw 0xAA55;make bootable
The program boots initializes the video mode but on a key press does nothing after a few key strokes it starts beeping with the keystrokes. The enter key does not trigger a warm boot. Any suggestions would be appreciated
__________________
Geeks may not be cool now but in the long run they prosper.
teencoder is offline   Reply With Quote