diff --git a/src/SUDOKU.MID b/src/SUDOKU.MID index 75ff132..688157d 100644 --- a/src/SUDOKU.MID +++ b/src/SUDOKU.MID @@ -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.