home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
CEXPRESS.ZIP
/
KEYBOARD.ASM
/
CAPSDOWN.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-05-03
|
569b
|
26 lines
;unsigned short caps_lock_down();
EXTRN _memory_model:byte
_TEXT SEGMENT BYTE PUBLIC 'CODE'
ASSUME CS:_TEXT
PUBLIC _caps_lock_down
_caps_lock_down proc near
push si ;
sub ax,ax ;clear AX
mov es,ax ;point ES to 0000:0000
mov si,418H ;offset of status byte
mov bl,64 ;test bit 6
mov ax,1 ;TRUE value
test es:[si],bl ;test the bit
jnz L1 ;jump if TRUE
mov ax,0 ;FALSE value
L1: pop si ;
cmp _memory_model,0 ;quit
jle quit ;
db 0CBh ;RET far
quit: ret ;RET near
_caps_lock_down ENDP
_TEXT ENDS
END