Add symbols for IO
This commit is contained in:
@@ -15,10 +15,12 @@ PDL: BLOCK PDLLEN ;Reserve the stack memory
|
|||||||
BPTR==440700 ;Define a byte pointer.
|
BPTR==440700 ;Define a byte pointer.
|
||||||
|
|
||||||
CHTTYO==1 ;Define a channel for TTY output.
|
CHTTYO==1 ;Define a channel for TTY output.
|
||||||
|
CHDSKI==2 ;Read channel for disk input.
|
||||||
|
|
||||||
JCL: BLOCK 30 ;Reserve space for the command line.
|
JCL: BLOCK 30 ;Reserve space for the command line.
|
||||||
FNAME1: BLOCK 15 ;The first part of the file name.
|
FNAME1: BLOCK 15 ;The first part of the file name.
|
||||||
FNAME2: BLOCK 15 ;The second file name.
|
FNAME2: BLOCK 15 ;The second file name.
|
||||||
|
FIELD: BLOCK 9 ;Reserve 9 words to
|
||||||
|
|
||||||
;Print flags
|
;Print flags
|
||||||
;Allows to change the beavihour of the OUTSTR and PUTLN subroutines.
|
;Allows to change the beavihour of the OUTSTR and PUTLN subroutines.
|
||||||
@@ -30,13 +32,18 @@ PFLAGS: BLOCK 1
|
|||||||
START: MOVE P,[-PDLLEN,,PDL-1] ;Initialize the stack.
|
START: MOVE P,[-PDLLEN,,PDL-1] ;Initialize the stack.
|
||||||
.OPEN CHTTYO,[.UAO,,'TTY] ;Open an output channel on the TTY.
|
.OPEN CHTTYO,[.UAO,,'TTY] ;Open an output channel on the TTY.
|
||||||
.LOSE %LSFIL ;Gobble up any errors.
|
.LOSE %LSFIL ;Gobble up any errors.
|
||||||
MOVEI A,001 ;Initialize the print flag
|
MOVEI A,000 ;Initialize the print flag
|
||||||
MOVEM A,PFLAGS ;to print SIXBIT
|
MOVEM A,PFLAGS ;to print ASCII
|
||||||
|
MOVE A,[BPTR,,WELCOME] ;Print the welcome message
|
||||||
|
PUSHJ P,PUTLN
|
||||||
PUSHJ P,GETJCL ;Read the command line.
|
PUSHJ P,GETJCL ;Read the command line.
|
||||||
|
MOVE A,[BPTR,,LOADING] ;Print the loading message
|
||||||
|
PUSHJ P,OUTSTR
|
||||||
MOVE A,[BPTR,,FNAME1] ;Read the parameter.
|
MOVE A,[BPTR,,FNAME1] ;Read the parameter.
|
||||||
PUSHJ P,PUTLN ;Print the file name
|
PUSHJ P,OUTSTR ;Print the file name
|
||||||
MOVE A,[BPTR,,FNAME2] ;Print the second file name.
|
MOVE A,[BPTR,,FNAME2] ;Print the second file name.
|
||||||
PUSHJ P,PUTLN
|
PUSHJ P,PUTLN
|
||||||
|
|
||||||
JRST DONE ;Jump to the end of the program.
|
JRST DONE ;Jump to the end of the program.
|
||||||
|
|
||||||
;Subroutine to read the JCL from DDT and get the command line parameters.
|
;Subroutine to read the JCL from DDT and get the command line parameters.
|
||||||
@@ -93,5 +100,10 @@ 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.
|
||||||
|
|
||||||
|
IMPRTF: PUSH P,A ;Save the A register.
|
||||||
|
.OPEN
|
||||||
|
|
||||||
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.
|
||||||
|
LOADING:ASCIZ /LOADING / ;Load message.
|
||||||
END START
|
END START
|
||||||
|
|||||||
Reference in New Issue
Block a user