Add prototype of a file read subroutine

This commit is contained in:
2025-09-08 22:48:12 +02:00
parent bd17f8bb79
commit e58b96cacf

View File

@@ -102,9 +102,16 @@ PUTLN: PUSHJ P,OUTSTR ;Calls the OUTSTR subroutine
.IOT CHTTYO,[^J] ;and a new line .IOT CHTTYO,[^J] ;and a new line
POPJ P, ;before returning. 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. 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. DONE: .LOGOUT 2, ;Exit point for the program.
WELCOME:ASCIZ /SUDOKU SOLVER v0.1/ ;Text of the welcome banner. WELCOME:ASCIZ /SUDOKU SOLVER v0.1/ ;Text of the welcome banner.
LOADING:ASCIZ /LOADING / ;Load message. LOADING:ASCIZ /LOADING / ;Load message.