home *** CD-ROM | disk | FTP | other *** search
- ; getkey.asm
- ;==========================================
- ; Wait for keyboard input during exec file
- ;==========================================
- ; Returns ASCII value of key pressed as the errorlevel
-
- ndx = $00d0
- getin = $ffe4
- int0e = $170e
- rdila = $1bfa
-
- star = $0b00
- .wor star
- * = star
-
- jmp getkey
- dw Date
-
- getkey lda rdila ; save exec status
- sta saveit
- lda #0 ; and turn it off
- sta rdila
- sta ndx ; clear keyboard buffer
- wait jsr getin
- cmp #0
- beq wait
- pha ; save keypress and return it as the errorlevel
- lda saveit ; and restore exec status
- sta rdila
- pla
- jmp int0e
-
- saveit *=*+1
-
- .end
-