Files
RomWBW/Source/BPBIOS/Z34RCP11/rcpwhl.lib
2020-02-14 17:22:56 -08:00

54 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
page
; Library: RCPWHL for Z34RCP
; Author: Carson Wilson
; Version: 1.0
; Date: June 15, 1988
;
; Command: WHL
; Function: Set the Wheel Byte on or off
; Comments:
;
; If WHLQUIET equate is true, then RCP does not report wheel status with WHL
; command.
;
; Forms:
; WHL -- Report Wheel Status
; WHL password -- Set Wheel ON if password is correct
; -- Set Wheel OFF if password incorrect
whl: ld hl,fcb1+1 ; Pt to first char
ld a,(hl) ; Get it
cp ' '
jr z,whlmsg ; Report wheel status if no password
ld de,whlpass
ld b,8 ; Check 8 chars
call comp ; Compare
jr nz,whloff ; Set wheel off if incorrect password
; Turn ON wheel byte
ld a,0ffh ; Turn on wheel byte
jr whlset
; Turn OFF wheel byte
whloff: xor a ; Turn off wheel byte
whlset: ld hl,(z3whl) ; Get wheel address from ENV
ld (hl),a ; Set wheel byte
if whlquiet
ret ; No report if WHLQUIET
endif
; Print Wheel Byte Message
whlmsg: call getwhl
jp tella ; Say " On" or " Off"
; Wheel password defined from SYSRCP.LIB file
db 'Z'-'@' ; Leading ^Z to block attempt to type RCP file
whlpass:wpass ; Use macro
; End RCPWHL.LIB