Can anyone help? 
Author Message
 Can anyone help?

I am having  trouble with a program I am writing to display a
vertical menu and moves a reverse video bar up and down across the
menu choice when the user presses an arrow on the keyboard.

title Chapter 6 - Question 2
.model small
.stack 100h

UP_ARROW = 48h
DOWN_ARROW =  50h

.data

.code
include library.inc
main proc

mov ds,ax
call clrscr
mov al,1
mov bh,70h
mov ch,0
mov cl,0
mov dh,1
mov dl,12

L1:
call GetArrow
cmp ax,0
je Quit
jmp L1

Quit:
mov ax,4c00h
int 21h
main endp

GetArrow proc
mov ah,10h
int 16h

UP_SCAN:
cmp ah,UP_ARROW
jne DOWN_SCAN
mov ax,1                ; AX =1= UP ARROW
jmp L2
DOWN_SCAN:
cmp ah,DOWN_ARROW
jne NO_SCAN
mov ax,3
jmp L2                ; AX =3= DOWN ARROW
NO_SCAN:
jmp L2

L2:                     ; COMPARE RESULT, OUTPUT MESSAGE
cmp ax,1
jne l3
mov ah,6
sub dh,1
sub ch,1
mov bh,70h
int 10h
mov bh,7
jmp last
l3:
cmp ax,3
jne l0
mov ah,7
inc ch
inc dh
mov bh,70h
jmp last
l0:
ret
last:
int 10h
ret
GetArrow endp

end main



Mon, 04 Nov 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. CA Cans VO ?

2. It's not bad canned meat...

3. It's not bad canned meat...

4. It's not bad canned meat...

5. Using CGI module with 'canned queries'

6. It's not bad canned meat...

7. Anyone help me with GNU's Blox ???

8. Can anyone help ?

9. A simple task: can anyone help me ?

10. Win32 and serial port - help, anyone?

11. Can anyone help with appleevents

12. Can anyone help me with this VB code ???

 

 
Powered by phpBB® Forum Software