home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
UNIFLEX
/
UNIFLEX
/
UniFLEX_Std.Utils1.tar.Z
/
UniFLEX_Std.Utils1.tar
/
utils1
/
page
< prev
next >
Wrap
Text File
|
1983-01-07
|
24KB
|
1,044 lines
opt pag
*
* info UniFLEX Page
*
ttl UniFLEX Page Utility
sttl UniFLEX system definitions
pag
lib sysdef
sttl Page utility definitions
pag
info UniFLEX page
info Version 2.01, Released December 21, 1982
info Copyright, (C) 1981, by
info Technical Systems Consultants, Inc.
info All rights reserved.
*
* Misc. equates
*
FSCHR equ 4 character type device
BUFSIZ equ 2048 size of buffer
HDLENT equ 5 number of lines for header
FTLENT equ 4 number of lines for footer
PGLGTH equ 66-FTLENT
dump macro
pshs cc
dec boo
bne hiss
puls cc
swi
boo fcb &1
hiss puls cc
endm
sttl Page main routine
pag
**
* page utility--formated list utility
*
* FORM: page [+options] file . . .
*
* WHERE:
* options are:
* l: print with line numbers,
* n: pause every n lines,
* p###: set page length to ###,
* f: replace a form feed with carriage returns.
*
* file is: normal UniFLEX file spec.
*
* Program starts here
*
org $000
*
* Initialize flags and varaibles
*
page sys cpint,3,bcksls
lda #$20 ascii space character
ldx #space point to spaces in header
page0 sta 0,x+ put space character in header
cmpx #tstr end of spaces?
blo page0 No, keep putting spaces
*
* Determine type of device the stdout file is on
*
leau 4,s point to arguments
ldd #1 set file descriptor = stdout
sys ofstat,stb get status of device
lda stb+4 get the device modes
bita #FSCHR is it a character device?
beq page1 No, not a chacter device.
inc chrflg Yes, it is a character device=>set flag
*
* Process any options and get count of options
*
page1 ldx 0,u++ point to the first argument
beq page5 if 0 then done looking
lda 0,x+ get the first character of argument
cmpa #'+ is it a "+" sign?
beq page15 Yes, process an option
bra page1 No, then keep looking!
page15 inc optcnt increment the count of options
page2 ldb 0,x+ get the option character
beq page1 look for more
cmpb #'l is it an "l"?
beq page4 Yes, go process!
cmpb #'p page length option?
beq page45 Yes!
cmpb #'f Form Feed option?
beq page46 Yes!
cmpb #'9 a digit?
bhi page2 No, illegal option!!!
cmpb #'0 a digit?
blo page2 No, illegal option!!!
*
* Process the "n" option
*
page3 leax -1,x point to first digit
lbsr getnum process number from args.
sta nopton number of lines/pause
leax -1,x point back to character
bra page2 repeat
*
* Process the "l" option
*
page4 inc lopton set the "l" option flag
bra page2 go look for more options
*
* Process the "p" option
*
page45 lbsr getnum get number
suba #FTLENT subtract lines for footer
bgt pag455 if valid result returned
lda #PGLGTH default page length
pag455 sta pglnth set page length
leax -1,x point back to character
bra page2 repeat
*
* Process "f" option
*
page46 inc noff set no FF flag
bra page2 repeat
*
* Get true file argument count
* total args-option args
*
page5 leau 4,s first set to first argument pointer
ldd 0,s get the argument count
subb optcnt total args-option args
*
* Test for the stdin file
*
cmpd #1 is file arg count only 1?
bhi page6 No, more file arguments than stdin
ldd #0 if only: "page" => stdin
inc stdinf set stdin only flag
bra page7
*
* Process the files to print
* get each file and open it for read
*
page6 ldx 0,u++ point to an argument
beq page11 if 0 then all done!
lda 0,x get first character of argument
cmpa #'+ is it a "+" sign?
beq page6 Yes, then ignore this argument
*
* If not an option then open a file
*
stx iopn2 setup the system open call
sys ind,iopn do file open for read
lbes prter on error!
*
* Read file into buffer
*
page7 pshs d save the file descriptor
bsr init initialize variables for each file
page8 bsr readln read a line of input
bes page9 End of file
lbsr writln write out a line of text
bra page8 repeat until end of file
*
* End of file!
*
page9 lbsr flushb flush final buffer
ldd 0,s++ get file descriptor
beq page6 file is stdin => repeat!
sys close close the file
page10 bra page6 repeat opening files until done!
page11 tst nopton n option set?
beq pag111 No, not set!
lbsr writcr put out last CR
pag111 ldd #0 ok status
page12 sys term terminate the task
*
* Handle CTRL-\
*
bcksls ldd #255 set terminate status
sys term terminate!!!
sttl Initialize variables for each file
pag
**
* init--initialize variables for each file
*
* INPUT:
* x points to the file name
*
init clra
clrb
sta lincnt clear line count
std linnum line number=0
std pgnum page number=0
ldd #inbuf point to start of input buffer
std inend set input buffer to empty
std inptr start of input buffer
ldd #outbuf start of output buffer
std outptr reset output buffer pointer
ldy #filenm point to file name in header
tst stdinf stdin only?
bne init2 Yes, blank fill the filename
init1 lda 0,x+ get character of file name
beq init2 if at end of file name
sta 0,y+ put into header
cmpy #tstr-1 check address
blo init1 if no overflow
init2 lda #$20 ascii space character
init3 sta 0,y+ pad file name in header with spaces
cmpy #tstr end of file name in header?
blo init3 No, keep putting spaces
rts return
sttl Read a line of input
pag
**
* readln--read a line of input
*
* INPUT:
* stack (2,s) contains the file's file descriptor
*
readln ldy #linbuf point to start of line buffer
ldx #linbuf point to start of line buffer
tst nopton n option set?
bne read22 ignore other processing of options
lda lincnt get current line count
bne readl1 Not the top of page
*
* If it is the top of page then get time and page number and
* print it as a heading.
*
adda #HDLENT increment line count for header
sta lincnt replace line count
sys time,buftim get system time
ldx #buftim point to system time buffer
lbsr tmloc get time and date information
pshs u save the argument pointer
lbsr tasc convert time and date into ascii string
puls u restore the argument pointer
ldd pgnum get the current page number
addd #1 increment page number
std pgnum save it
ldx #pgnm point to string buffer area
lbsr decst convert pgnum into pgnm
ldx #header point to the string
ldy #hedend point to end of header string
tst noff check for form feed disable
beq readl5 if no disable in force
leax 1,x skip form feed
bra readl5 exit and print heading
readl1 cmpa pglnth at bottom of page?
blo readl2 No, not at bottom
bsr footer do footer routine
clr lincnt reset the line count
bra readl5 finish up
readl2 lda nopton check for n option
beq read25 if not set
read22 lda ncount get count for n option
cmpa nopton ready to set a pause yet?
blo read25 No, not enough lines!
lda #$FF UniFLEX pause character
sta 0,y+ put in line buffer
clr ncount reset to zero
bra readl5 finish up
read25 lda #$D Cariage Return
sta 0,y+ put CR at start of buffer
tst lopton is l option set?
beq read35 No, is not set
ldd linnum get the line number
addd #1 increment line number
std linnum save it
ldx #number
pshs y save the line buffer pointer
lbsr decst convert linnum into number
puls y restore the line buffer pointer
readl3 ldb 0,x+
stb 0,y+ put line number into front of line buffer
cmpx #numend end of number?
blo readl3 Yes, then keep transfering
read35 ldx #linbuf point to start of line buffer
readl4 bsr getch get a character from input buffer
bes readl6 end of file
cmpa #$D is character a CR?
beq read45 Yes, then done
sta 0,y+ else store the character
bra readl4 repeat until a CR
read45 inc lincnt next line
inc ncount bump pause line count
readl5 sty linend put next available position at line end
clc clear end of file flag
readl6 rts return
sttl Bottom of page routine
pag
**
* footer--bottom of page routine
*
* USES:
* a
*
* Entry:
* y points to line buffer
*
footer lda #$D CR
tst noff No FF?
beq foote1 No!
sta 0,y+ send out 1 CR to end last line
sta 0,y+ send out 4 more CRs for footer
sta 0,y+
sta 0,y+
sta 0,y+
bra foote2
foote1 sta 0,y+ put in one CR to end line
foote2 rts return
sttl Get input character
pag
**
* getch--get input character
*
getch pshs x save pointer to line buffer
ldx inptr pointer into input buffer
cmpx inend at end of input buffer?
blo getch2 No, not at end!
ldd 6,s File Descriptor on the stack!
sys read,inbuf,BUFSIZ system read
lbes ioerr error!!?
ldx #inbuf point to input buffer
stx inptr reset pointer
cmpd #0 end of file?
bne getch1 No, not end of file!
sec set error bit =>end of file
puls x,pc restore and return
getch1 addd inptr read count + start of input buffer =
std inend the end of the input buffer
getch2 lda 0,x+ get a character from buffer
stx inptr set the input buffer pointer
clc clear end of file flag
puls x,pc restore and return
sttl Write a line of output
pag
**
* writln--write a line of output
*
* INPUT:
* x points to the line string to output
*
writln ldy outptr point into output buffer
writl2 lda 0,x+ get chacracter from line or header
sta 0,y+ put character into output buffer
cmpy #outend at end of output buffer?
blo writl5 No, repeat
ldd #BUFSIZ byte count
tst chrflg character type device?
beq writl3 No, not character device
bsr tpage print on terminal device
bra writl4 reset and exit
writl3 std iwrtx2 set up system call
ldd #1 FD=stdout
sys ind,iwrtx do write
lbes ioerr error!!!
writl4 ldy #outbuf point to start of output buffer
writl5 cmpx linend at end of line?
blo writl2 No, keep going!
sty outptr set output buffer pointer
rts return
sttl Print to terminal type device
pag
**
* tpage--print to terminal type device
*
* Input:
* d contains the byte count to print
*
* Output:
* x,d preserved
*
tpage pshs x,d save the write count
ldx #outbuf point to the output buffer
tpage2 ldd #32 32 bytes at a time
cmpd 0,s is 32 > remainging bytes in buffer?
bhs tpage3 Yes, then just print out remaining
std iwrt2 set system call
stx iwrt1
ldd #1 FD=stdout
sys ind,iwrt do the write
bes ioerr error!!!
ldd 0,s get the byte count
subd #32 subtract the transfered bytes
std 0,s replace the count
leax 32,x advance the buffer pointer
bra tpage2 repeat until byte count < 32
tpage3 stx iwrt1 pointer into output buffer
puls d get the final byte count
std iwrt2
ldd #1 FD=stdout
sys ind,iwrt do last write
puls x,pc return
sttl Convert from number to binary number
pag
**
* getnum--get number
*
* Entry:
* x points to first digit
*
* Exit:
* a contains number
* b is destroyed
*
getnum clra
getnu1 ldb 0,x+ get digit
beq getnu2 if 0 then done
cmpb #'9 not a digit?
bhi getnu2 Yes, not a digit!
subb #'0 get a binary digit
blt getnu2 not a digit!
sta r0 temporary
lsla multiply by 10
lsla
adda r0
lsla
aba add in ones digit
bra getnu1 repeat
getnu2 rts return
sttl Print error message routine
pag
**
* prter--print error message
*
* Input:
* d has the error number
*
prter std erno save the error number
ldd #2 FD=stderr
sys write,ermsg1,ERSZ1
ldx iopn2 get the file name
stx iwrt1
clrb set counter to 0
prter2 lda 0,x+ look for end of name
beq prter3
incb increment counter of characters
bra prter2 repeat until done
prter3 std iwrt2 save the count
ldd #2 FD=stderr
sys ind,iwrt output filename
ldd #2 FD=stderr
sys write,ermsg2,ERSZ2
ldd erno get error status
sys term terminate task
sttl I/O error routine
pag
**
* ioerr--I/O error routine
*
* Entry:
* d has erro number in it
*
ioerr std erno save error number
ldd #2 FD=stderr
sys write,ermsg3,ERSZ3 write error message
ldd erno get error number
sys term terminate task!
sttl Flush the output buffer
pag
**
* flushb--flush the output buffer
*
* Uses:
* y,d
*
flushb ldy outptr point into output buffer
tst noff No Form Feed?
beq flus07 No, has FF!
lda #$D CR
flus01 ldb lincnt test line count
cmpb pglnth end of page?
bhi flus07 Yes, done!
sta 0,y+
inc lincnt
bra flus01
flus07 tst nopton n option set?
bne flus08 Yes, don't put footer!
lbsr footer
flus08 tfr y,d buffer pointer
subd #outbuf get byte count for Xfer
tst chrflg character type device?
beq flush1 No, not character device
lbsr tpage print on terminal device
bra flush2 reset and exit
flush1 std iwrtx2 set up system call
ldd #1 FD=stdout
sys ind,iwrtx do write
bes ioerr error!!!
flush2 ldy #outbuf point to start of output buffer
sty outptr set output buffer pointer
rts return
sttl Write out a final CR
pag
**
* writcr--write out a final CR
*
* Uses: x,a
*
writcr ldx outptr point at output buffer
lda #$D Carriage Return
sta 0,x+
stx outptr replace the output buffer pointer
bsr flushb flush the CR
rts return
sttl Get time and date routines
pag
**
* tmloc
*
* Convert time pointed at by x to vector time (local).
*
tmloc ldd 0,x get time
std ltime
ldd 2,x
std ltime+2
lda 7,x get day light savings flag
sta dlflg
clr eutc init flag
ldd 5,x get time zone
bpl tmloc2 west of GMT?
inc eutc if not - set flag
coma and make pos number
comb
addd #1
tmloc2 std r0+2 save time zone
ldd #60 calculate zone seconds
std r1+2
ldd #0 set hi bytes to 0
std r0
std r1
lbsr lmul calculate time zone seconds
ldd r0 get result
std tzn save it
ldd r0+2
std tzn+2
lbsr adjtim adjust time for zone
ldx #ltime point to time
bsr tmutc convert to vector
tst dlflg do dlst?
beq tmloc6
lbsr chkdl in dlst?
bne tmloc6
tmloc5 ldd #3600 adjust for dlst
addd ltime+2
std ltime+2
ldd ltime
adcb #0
adca #0
std ltime
ldx #ltime point to time
bsr tmutc convert to vector
inc daylit set daylit flag
tmloc6 ldx #second point to vector
rts return
pag
**
* tmutc
*
* Convert the internal system time (4 bytes
* pointed at by X on entry) to an 18 byte
* vector representing the broken down time.
* The time in this form is UTC (Universal
* Coordinated Time).
*
tmutc ldd #0 set daylight savings word
std daylit
ldd 0,x get hi word of time
std r0 save ir divide register
ldd 2,x get lo word of time
std r0+2
ldd #60*60 seconds*minutes constant
std r1 set up for divide
lbsr ldiv min*sec=time % 3600
ldd work hour*day=time / 3600
pshs d save min*sec
ldd #24 set up hours per day constant
std r1
lbsr ldiv hours= (hour*day) % 24
ldd work day= (hour*day) / 24
std hours set hours word
ldd r0+2 get day number
std day save the day
addd #2 add in day bias (Jan 1 80 => Tue)
std r0 set up for divide
ldb #7 days per week constant
stb r1
lbsr div wday=(day+2) % 7
ldb work get result
clra make into word
std wday set week day
puls d get min*sec
std r0 set up for divide
ldb #60 seconds per minute
stb r1
lbsr div seconds= (min*sec) % 60
ldb work minutes= (min*sec) / 60
clra
std second set seconds word
ldd r0 get minutes
std minute save it
pag
*
* continue tutc for year and month data
*
clr 0,-s clear year counter
tutc2 ldx #ylen point to year length table
lda 0,s get year number
bita #$3 is it leap year?
bne tutc3
leax 2,x if so, move to long year value
tutc3 ldd day get day number
cmpd 0,x day in current year?
blo tutc4 if 'lt' - we got the year!
subd 0,x subtract off years days
std day save new day count
inc 0,s bump the year count
bra tutc2 repeat
tutc4 std yday set day of year word
puls b get year count
addb #80 add to '1980'
clra make 16 bits long
std year save the year
bitb #$3 is it leap year?
bne tutc5
ldd #29 if so, set Feb day count to 29
std mdays+2
tutc5 ldx #mdays point to month-day table
clr 0,-s set month count to zero
ldd yday get day of the year
tutc6 cmpd 0,x in the month?
blo tutc7 if 'lt' - we got the month!
inc 0,s bump the month counter
subd 0,x++ subtract of this month's days
bra tutc6
tutc7 addd #1 add 1 to month day (day 1 is 1 - not 0!)
std mday save the month day
puls b get the month
std month save it
ldd #28 reset month - day table
std mdays+2
rts return
pag
**
* chkdl
*
* Check if in dlst - return 'eq' if so.
*
chkdl ldd #119 check for last Sun in Apr
bsr fixtim
std fstdl first day of dlst
ldd #303 last Sun in Oct
bsr fixtim
std lstdl last day of dlst
ldd yday get day of year
cmpd fstdl up to 1st day yet?
blo chkdl6
bhi chkdl4
ldd hours on the 1st day - so
cmpd #2 is it 2:00 AM yet?
blo chkdl6
bra chkdl5
chkdl4 ldd yday get day of year
cmpd lstdl past last day of dlst?
bhi chkdl6
blo chkdl5
ldd hours on the last day - so
cmpd #1 is it 1:00 AM yet?
bhs chkdl6
chkdl5 sez we are in dlst!
rts return
chkdl6 clz not in dlst
rts return
pag
**
* adjtim
*
* Adjust time for time zone.
*
adjtim ldd ltime+2 get time
tst eutc east of UTC?
bne adjti2
subd r0+2 subtract time zone minutes
std ltime+2
ldd ltime get hi part
sbcb r0+1
sbca r0
bra adjti4
adjti2 addd r0+2 add in minutes
std ltime+2
ldd ltime
adcb r0+1
adca r0
adjti4 std ltime save new time
adjti5 rts return
**
* fixtim
*
* Return the closest day to the date in D
* which is a Sunday.
*
fixtim pshs d save day number
ldd year get year
bitb #$3 is it leap year?
puls d
bne fixti2
addd #1 if so - bump day number
fixti2 pshs d save day number
addd #420 add in 420 so no negatives result
addd wday add in day of week
subd yday subtract day of year
std r0 save result
ldb #7
stb r1 set up for divide
bsr div do: (day+420+wday-yday) % 7
puls d get day number
subb work
sbca #0
rts return day in d
pag
**
* Divide routines for time conversion use. 'Ldiv'
* divides a 32 bit number (r0 -> r0+3) by a 16 bit
* number (r1 -> r1+1) and produces a 32 bit result
* in r0 and a 16 bit remainder in 'work'. 'Div'
* divides a 16 bit number (r0 -> r0+1) by an 8 bit
* number (r1) and produces a 16 bit result (r0)
* and an 8 bit remainder (work).
*
div lda #17 set up loop counter
clrb do initialize
stb work
bra div2
div1 ldb work
subb r1 do subtraction
bcs div2 s3et new work?
stb work yes!
div2 rol r0+1 do shift left
rol r0
rol work
deca dec the loop count
bne div1 repeat?
com r0 fix up result
com r0+1
lsr work fix remainder
rts
pag
**
* Long divide
*
ldiv ldb #33 set loop counter
pshs b
ldd #0 do init
std work
bra ldiv2
ldiv1 ldd work do subtraction
subd r1
bcs ldiv2 work > r1 ?
std work set new work value
ldiv2 rol r0+3 do shifting
rol r0+2
rol r0+1
rol r0
rol work+1
rol work
dec 0,s dec the loop count
bne ldiv1
com r0 compliment the result
com r0+1
com r0+2
com r0+3
lsr work adjust the remainder
ror work+1
puls b,pc return
pag
**
* lmul
*
* Long multiply - 32 bits (r0) X 32 bits (r1).
* Result is in r0.
*
lmul ldb #32 set loop count
pshs b
ldd #0 init variables
std work
std work+2
lsr r0 do initial shift
ror r0+1
ror r0+2
ror r0+3
lmul1 bcc lmul2 need to add?
ldd work+2
addd r1+2
std work+2
ldd work
adcb r1+1
adca r1
std work save result
lmul2 ror work do shifting
ror work+1
ror work+2
ror work+3
ror r0
ror r0+1
ror r0+2
ror r0+3
dec 0,s dec the loop count
bne lmul1 repeat?
puls b,pc return
pag
**
* tasc
*
* Convert the time vector data (18 bytes) pointed
* at by x into an ascii string. Return x pointing
* to the string.
*
tasc tfr x,u save vector pointer
ldx #tstr point to string
ldd 4,u get hours
bsr cvt convert to ascii
leax 1,x skip the ':'
ldd 2,u get minutes
bsr cvt convert to ascii
leax 1,x skip the ':'
ldd 0,u get seconds
bsr cvt convert to ascii
leax 1,x skip space
ldd 6,u get day of week
ldy #dtab point to day table
bsr tasxfr xfr to string
ldd 10,u get month
ldy #mtab point to month table
bsr tasxfr xfr to string
ldd 8,u get month day
bsr cvt convert to ascii
leax 1,x
ldd #('1<<8)|'9 set up '19'
std 0,x save in string
ldd 12,u get year
cmpd #100 >100 (year 2000 yet?)
blo tasc4
subd #100 remove bias
pshs d save year
ldd #('2<<8)|'0 set up '20'
std 0,x set in string
puls d reset year
tasc4 leax 2,x
bsr cvt convert year to ascii
ldx #tstr point to string
rts return
pag
**
* tasxfr
*
* Transfer the 3 bytes of ascii indexed by b
* at y to location pointed at by x.
*
tasxfr pshs b index * 3
aslb
addb 0,s+
leay b,y point to indexed data
ldd 0,y xfr the data to x
std 0,x++
lda 2,y
sta 0,x
leax 2,x bump string pointer
rts return
**
* cvt
*
* Convert number in b to ascii at x.
*
cvt lda #'0 set ascii 0
cvt2 cmpb #10 >10?
blo cvt4
subb #10 subtract off 10
inca bump ascii
bra cvt2 repeat
cvt4 addb #'0 make 1's ascii
std 0,x++ save ascii at x
rts return
sttl Decimal to string convert routine
pag
**
* decst
*
* Convert the number in D into an ascii string
* representing a decimal number. The string
* is pointed at by X (X should be set on entry!)
* Also on exit, D has the length of the string.
* The second entry point, 'decstn' will not print
* leading spaces for leading zeroes, but will
* suppress all leading zero info. All strings
* start with a space.
*
decst pshs x save user pointer
clr 0,-s set suppression flag
bra decst2
*
decstn pshs x save user pointer
clr 0,-s
inc 0,s set for no fielding
decst2 pshs a
lda #$20 setup leading space
sta 0,x+ save in buffer
puls a
clr 0,-s set up bookkeeping
clr 0,-s
ldy #conlst point to constants
decst4 cmpd 0,y compare number to constant
blo decst5
subd 0,y do subtraction of constant
inc 1,s bump digits counter
bra decst4
decst5 pshs a save number
tst 2,s zero digit?
bne decst6
tst 1,s any numbers output yet?
bne decst6
tst 3,s doing suppression?
bne decst8
lda #$20 set up space
bra decst7
decst6 lda 2,s get digit count
inc 1,s set 'got one' flag
ora #$30 make ascii
decst7 sta 0,x+ save in buffer
decst8 puls a reset number
clr 1,s clear out digit
leay 2,y bump constant ptr
cmpy #conend end of list?
bne decst4
leas 3,s clean up stack
orb #$30 make last digit
stb 0,x+ save in buffer
clr 0,x null terminate string
tfr x,d
subd 0,s calculate string length
puls x,pc return
* constants for convert
conlst fdb 10000
fdb 1000
fdb 100
fdb 10
conend equ * end of list
sttl Program storage
pag
*
* constants, strings, and storage
*
*
ermsg1 fcc "Can't open '"
ERSZ1 equ *-ermsg1
ermsg2 fcc "'.",$d
ERSZ2 equ *-ermsg2
ermsg3 fcc "I/O error!",$D
ERSZ3 equ *-ermsg3
*
ylen fdb 365 year length
fdb 366 leap year
mdays fdb 31,28,31,30,31,30,31,31,30,31,30,31
second fdb 0 seconds (0-59)
minute fdb 0 minutes (0-59)
hours fdb 0 hours (0-23)
wday fdb 0 week day (0-6) 0=Sunday
mday fdb 0 month day (1-31)
month fdb 0 month (0-11)
year fdb 0 year (80+)
yday fdb 0 day of year (0-355)
daylit fdb 0 daylight savings flag
r0 fdb 0,0 regs for div and mul
r1 fdb 0,0
work fdb 0,0
day fdb 0 day temp
ntime fdb 0,0 new time
eutc fcb 0 east of utc flag
fstdl fdb 0 1st day of dlst
lstdl fdb 0 last day of dlst
ltime fdb 0,0 local time
tzn fdb 0,0 time zone seconds
erno fdb 0 error number
linnum fdb 0 line number
pgnum fdb 0 page number
inptr fdb 0 input buffer pointer
inend fdb 0 end of input buffer
outptr fdb 0 output buffer pointer
*
dlflg fcb 0 dlst flag
chrflg fcb 0 character device flag
optcnt fcb 0 option count
lincnt fcb 0 line count
lopton fcb 0
nopton fcb 0
stdinf fcb 0 stdin only flag
pglnth fcb PGLGTH page length
noff fcb 0 no FF flag
ncount fcb 0 pause line count
*
iwrt fcb write write call
iwrt1 fdb 0
iwrt2 fdb 0 transfer count
*
iwrtx fcb write
fdb outbuf
iwrtx2 fdb 0
*
iopn fcb open
iopn2 fdb 0,0
*
linbuf rmb 256 line buffer
linend fdb 0 end of line buffer
*
number rmb 6 number string space
fcc $0,'=',$20
numend equ * end number space
*
header fcc $C,$D,$D
filenm rmb 14 file name of header
space rmb 16 spaces in header
tstr fcc 'xx:xx:xx xxx xxx xx xxxx'
fcc ' Page'
pgnm rmb 6 page number
fcc $0,$D,$D,$0
hedend equ * end of header
*
dtab fcc 'SunMonTueWedThuFriSat'
*
mtab fcc 'JanFebMarAprMayJunJulAugSepOctNovDec'
*
stb rmb 24 status buffer
buftim rmb 8 UniFLEX time buffer
sttl Buffer area
pag
*
*
inbuf rmb BUFSIZ
*
outbuf rmb BUFSIZ
outend equ * end of output buffer
*
end page