Use file addresses
This commit is contained in:
@@ -39,9 +39,7 @@ 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,[%CLIN,,FNAME1] ;Store the first file name in A
|
||||
MOVEI B,[%CLIN,,FNAME2] ;Store the second file name in B
|
||||
MOVEI C,FIELD ;Store the address of field in C
|
||||
MOVEI A,FIELD ;Store the address of field in C
|
||||
PUSHJ P,IMPRTF ;Load the file
|
||||
PUSHJ P,PFIELD ;Print the loaded field.
|
||||
|
||||
@@ -139,7 +137,7 @@ IMPRTF: PUSH P,A ;Save the A register.
|
||||
MOVE X,[440400,,FIELD] ;Init a 4-bit byte pointer to FIELD.
|
||||
.CALL [SETZ ? SIXBIT/OPEN/ ;Open a file descriptor.
|
||||
[.UAI,,CHDSKI] ? [SIXBIT/DSK/] ;Mode, channel and device name
|
||||
[0,,A] ? [0,,B] ((SETZ))]
|
||||
? FNAME1 ? FNAME2 ((SETZ))]
|
||||
.LOSE %LSFIL ;Handle errors after opening the file
|
||||
IMPRD: .IOT CHDSKI,A ;Read an ascii char into A.
|
||||
JUMPL A,IMPREX ;If there was nothing read, exit.
|
||||
|
||||
Reference in New Issue
Block a user