Disable conversion to SIXBIT in GETJCL
This commit is contained in:
17
src/sudoku.s
17
src/sudoku.s
@@ -64,13 +64,26 @@ GETJCL: PUSH P,A ;Save the register A.
|
|||||||
MOVE A,[JCL]
|
MOVE A,[JCL]
|
||||||
MOVE A,[BPTR,,JCL] ;Load the command parameters into A.
|
MOVE A,[BPTR,,JCL] ;Load the command parameters into A.
|
||||||
MOVE B,[BPTR,,FNAME1] ;Pointer to the first file name.
|
MOVE B,[BPTR,,FNAME1] ;Pointer to the first file name.
|
||||||
PUSHJ P,TOSIXB ;Transfer the first word into FNAME1
|
PUSHJ P,CPSTR ;Transfer the first word into FNAME1
|
||||||
MOVE B,[BPTR,,FNAME2] ;Pointer to the second file name.
|
MOVE B,[BPTR,,FNAME2] ;Pointer to the second file name.
|
||||||
PUSHJ P,TOSIXB ;Transfer the second word into FNAME2
|
PUSHJ P,CPSTR ;Transfer the second word into FNAME2
|
||||||
POP P,B ;Restore the B register.
|
POP P,B ;Restore the B register.
|
||||||
POP P,A ;Restore the A register.
|
POP P,A ;Restore the A register.
|
||||||
POPJ P, ;Return from routine.
|
POPJ P, ;Return from routine.
|
||||||
|
|
||||||
|
;Subroutine to copy a string. Takes a bytepointer in A and B
|
||||||
|
;where A is the source and B is the destination. It will stop copying, if
|
||||||
|
;the end of the string is reached, or a whitespace is encounterd,
|
||||||
|
CPSTR: PUSH P,D ;Store the contents of register D.
|
||||||
|
CPSTLP: ILDB D,A ;Load the next character from A.
|
||||||
|
JUMPE D,CPSTEN ;Exit the loop.
|
||||||
|
CAIN D,40 ;If the character is whitespace
|
||||||
|
JUMPA CPSTEN ;exit the loop.
|
||||||
|
IDPB D,B ;Deposit the charcter at destination.
|
||||||
|
JRST CPSTLP ;Repeat with the next character
|
||||||
|
CPSTEN: POP P,D ;Restore the D register.
|
||||||
|
POPJ P, ;Return from function.
|
||||||
|
|
||||||
;Subroutine to convert an ASCII string into SIXBIT. Takes a byte
|
;Subroutine to convert an ASCII string into SIXBIT. Takes a byte
|
||||||
;pointer in A and B, where A is the source and B is the destination.
|
;pointer in A and B, where A is the source and B is the destination.
|
||||||
TOSIXB: PUSH P,D ;Store the contents of register D.
|
TOSIXB: PUSH P,D ;Store the contents of register D.
|
||||||
|
|||||||
Reference in New Issue
Block a user