Add prototype of a file read subroutine
This commit is contained in:
@@ -102,9 +102,16 @@ PUTLN: PUSHJ P,OUTSTR ;Calls the OUTSTR subroutine
|
||||
.IOT CHTTYO,[^J] ;and a new line
|
||||
POPJ P, ;before returning.
|
||||
|
||||
;Subroutine that reads the contents of the file into the buffer at FIELD
|
||||
IMPRTF: PUSH P,A ;Save the A register.
|
||||
.OPEN CHDSKI,[.UOA,,]
|
||||
|
||||
.CALL [SETZ ? SIXBIT/OPEN/ [.UAI,,CHDSKI] ? FNAME1 ? FNAME2 ((SETZ))]
|
||||
.LOSE %LSFIL ;Handle errors after opening the file
|
||||
.CALL [SETZ ? SIXBIT/SIOT/ [,,CHDSKI] ? [BPTR,,FIELD] ? [,,33] ((SETZ))]
|
||||
.LOSE %LSFIL
|
||||
.CALL [SETZ ? SIXBIT/CLOSE/ [,,CHDSKI] ((SETZ))]
|
||||
.LOSE %LSFIL
|
||||
POP A ;Restore the A register.
|
||||
POPJ P ;Return from the input subroutine,
|
||||
DONE: .LOGOUT 2, ;Exit point for the program.
|
||||
WELCOME:ASCIZ /SUDOKU SOLVER v0.1/ ;Text of the welcome banner.
|
||||
LOADING:ASCIZ /LOADING / ;Load message.
|
||||
|
||||
Reference in New Issue
Block a user