turbo-pascal-assembly

009C Initialize Output Text File

Initializes Output File. This is similar to the following Pascal routine:

Assign(Output, '');
Rewrite(Output);
SYS009C: MOV AX,OFFSET Output
SYS009F: PUSH DS
SYS00A0: PUSH AX
SYS00A1: PUSH DS
SYS00A2: PUSH AX

Push pointer to Output twice. The first one is for SYS:0369 Reset Function, the second one for SYS:02E6 Assign Function.

SYS00A3: MOV AX,0263
SYS00A6: PUSH CS
SYS00A7: PUSH AX
SYS00A8: PUSH CS
SYS00A9: CALL 02E6

Assigns empty string ’’ in SYS:0263 to Output on a call to SYS:02E6 Assign Function.

SYS00AC: PUSH CS
SYS00AD: CALL 0369

Calls SYS:0369 Rewrite Function and use Output’s OpenFunc to open it.

SYS00B0: RETF

Initialization is complete. Return to MAIN.

See also: Text File Type, SYS:0263 Empty string, SYS:02E6 Assign Function, SYS:0369 Reset/Rewrite Function or Go Back