home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
SIMTEL20
/
ZCPR3
/
IFSTAT.MAC
< prev
next >
Wrap
Text File
|
2000-06-30
|
1KB
|
86 lines
;
; Program: IFSTAT
; Author: Richard Conn
; Version: 1.0
; Date: 22 Apr 84
; Previous Versions: None
;
version equ 10
;
; IFSTAT is used to display the current IF level.
;
;
; Equates for Key Values
;
z3env SET 0f400h ;address of ZCPR3 environment
fcb equ 5ch
cr equ 0dh
lf equ 0ah
;
; External Z3LIB and SYSLIB Routines
;
ext z3init,iftest,eprint,cout
;
; Environment Definition
;
if z3env ne 0
;
; External ZCPR3 Environment Descriptor
;
jmp start
db 'Z3ENV' ;This is a ZCPR3 Utility
db 1 ;External Environment Descriptor
z3eadr:
dw z3env
start:
lhld z3eadr ;pt to ZCPR3 environment
;
else
;
; Internal ZCPR3 Environment Descriptor
;
MACLIB Z3BASE.LIB
MACLIB SYSENV.LIB
z3eadr:
jmp start
SYSENV
start:
lxi h,z3eadr ;pt to ZCPR3 environment
endif
;
; Start of Program -- Initialize ZCPR3 Environment
;
call z3init ;initialize the ZCPR3 Environment
lda fcb+1 ;check for help
cpi '/'
jz prhelp
call iftest ;get number of current IF
jnz prnum ;print number
call eprint
db ' No Active IF',0
ret
prnum:
call eprint
db ' Current IF Level: ',0
adi '0' ;convert to ASCII
jmp cout
;
; Print Help Message
;
prhelp:
call eprint
db 'IFSTAT, Version '
db (version/10)+'0','.',(version mod 10)+'0'
db ' - Display Current IF Level'
db cr,lf,'Syntax: IFSTAT'
db 0
ret
end