home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff339.lzh
/
PCQ
/
Runtime.lzh
/
Runtime
/
Readers
/
get.asm
< prev
next >
Wrap
Assembly Source File
|
1989-11-20
|
768b
|
35 lines
*
* Get.asm (of the PCQ Pascal runtime library)
* Copyright (c) 1989 Patrick Quaid
*
* This routine is much the same as ReadArb, but just moves
* the file pointer rather than reading anything.
*
*
* On entry this routine expects a0 to hold the address of the
* file record
*
INCLUDE ":runtime/FileRec.i"
SECTION Get,CODE
XREF _p%FillBuffer
XREF _p%IOResult
XDEF _p%Get
_p%Get
tst.l _p%IOResult ; is IO system OK?
bne 1$
tst.b EOF(a0) ; are we at EOF?
bne.s 1$ ; if so, leave
move.l CURRENT(a0),a1 ; get the current ptr
adda.l RECSIZE(a0),a1 ; add one record
move.l a1,CURRENT(a0) ; save the new ptr
cmpa.l LAST(a0),a1 ; is it past end?
blt.s 1$ ; if not, skip the read
jsr _p%FillBuffer ; read a new buffer-full
1$ rts ; return
END