home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
packet
/
rli120.ark
/
PARAM.MAC
< prev
next >
Wrap
Text File
|
1987-01-18
|
2KB
|
122 lines
; PARAM.MAC - 1/17/87 - Set parameter value.
; Suggested by k1bc...
.xlist
.z80
include TNC.LIB
tncdefs
.list
entry paramc,prtpar
external decbin,fcb2,numb,opt2,erwhat,erdone,ynbq
external bindec,@outch,@outn
external kilfwd,bbsa,bbsb,ndigia,ndigib,bbsl
; "Pn value" command. Set a parameter from the local console
cseg
paramc: ld a,(opt2) ; Param ID
ld hl,ndigia
cp '1'
jr z,binset
ld hl,ndigib
cp '2'
jr z,binset
ld hl,bbsa
cp '3'
jr z,bynbqs
ld hl,bbsb
cp '4'
jr z,bynbqs
ld hl,kilfwd
cp '5'
jr z,booset
ld hl,bbsl
cp '6'
jr z,bynbqs
; add more params here
jp erwhat ; Unknown param number
binset: push hl
zmov numb,fcb2+1,5
call decbin
ld a,l ; Value
pop hl
jp c,erwhat ; Not a number
ld (hl),a ; Store the value
jp erdone
bynbqs: ld (hl),btime
ld a,(fcb2+1)
cp 'B'
jp z,erdone
ld (hl),qtime
cp 'Q'
jp z,erdone
booset: ld (hl),true
ld a,(fcb2+1)
cp 'Y'
jp z,erdone
ld (hl),false
cp 'N'
jp z,erdone
jp erwhat
prtp: ld c,'P'
call @outch
ld c,e
call @outch
ld c,'='
jp @outch
prtc: ld c,','
call @outch
ld c,' '
jp @outch
prtboo: ld l,a
call prtp
ld a,l
call ynbq ;Convert possible B/Q to Y/N
ld c,'N'
jp z,@outch
ld c,'Y'
jp @outch
prtbin: ld l,a
call prtp
ld h,0
call bindec
ld hl,numb+3
ld b,2
jp @outn
prtpar: ld e,'1'
ld a,(ndigia)
call prtbin
call prtc
ld e,'2'
ld a,(ndigib)
call prtbin
call prtc
ld e,'3'
ld a,(bbsa)
call prtboo
call prtc
ld e,'4'
ld a,(bbsb)
call prtboo
call prtc
ld e,'5'
ld a,(kilfwd)
call prtboo
call prtc
ld e,'6'
ld a,(bbsl)
jr prtboo
end