From f517803b0f211796e2e318006bfa2a46b04dfb88 Mon Sep 17 00:00:00 2001 From: Jali Date: Sun, 30 Nov 2025 13:59:50 +0100 Subject: [PATCH] Debug: Print FNAME1 and FNAME2 after being stored as SIXBIT --- src/sudoku.s | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/sudoku.s b/src/sudoku.s index dc3ec56..baf7929 100644 --- a/src/sudoku.s +++ b/src/sudoku.s @@ -39,10 +39,19 @@ START: MOVE P,[-PDLLEN,,PDL-1] ;Initialize the stack. PUSHJ P,GETJCL ;Read the command line. MOVE A,[BPTR,,LOADING] ;Print the loading message PUSHJ P,OUTSTR - MOVEI A,FIELD ;Store the address of field in C - PUSHJ P,IMPRTF ;Load the file - PUSHJ P,PFIELD ;Print the loaded field. - + ; Hold off loading the file, and instead, try to figure out, if they + ; are stored as SIXBIT + ;MOVEI A,FIELD ;Store the address of field in C + ;PUSHJ P,IMPRTF ;Load the file + ;PUSHJ P,PFIELD ;Print the loaded field. + + MOVEI A,001 ;Pretend the field name is SIXBIT + MOVEM A,PFLAGS ;Store flags in PFLAGS + MOVE A,[BPTR,,FNAME1] ;Load FNAME1 into the A + PUSHJ P,PUTLN ;Print the name in a single line + MOVE A,[BPTR,,FNAME2] ;Now repeat with FNAME2 + PUSHJ P,PUTLN + JRST DONE ;Jump to the end of the program. ;Subroutine to read the JCL from DDT and get the command line parameters. @@ -55,9 +64,9 @@ GETJCL: PUSH P,A ;Save the register A. MOVE A,[JCL] MOVE A,[BPTR,,JCL] ;Load the command parameters into A. MOVE B,[BPTR,,FNAME1] ;Pointer to the first file name. - ;PUSHJ P,TOSIXB ;Transfer the first word into FNAME1 + PUSHJ P,TOSIXB ;Transfer the first word into FNAME1 MOVE B,[BPTR,,FNAME2] ;Pointer to the second file name. - ;PUSHJ P,TOSIXB ;Transfer the second word into FNAME2 + PUSHJ P,TOSIXB ;Transfer the second word into FNAME2 POP P,B ;Restore the B register. POP P,A ;Restore the A register. POPJ P, ;Return from routine.