Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.28 KB

0088-INIT-INPUT.md

File metadata and controls

37 lines (28 loc) · 1.28 KB

0088 Initialize Input Text File

Initializes Input file. This is similar to the following Pascal routine:

Assign(Input, '');
Reset (Input);
SYS0088: MOV AX,OFFSET Input
SYS008B: PUSH DS
SYS008C: PUSH AX
SYS008D: PUSH DS
SYS008E: PUSH AX

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

SYS008F: MOV AX,0263
SYS0092: PUSH CS
SYS0093: PUSH AX
SYS0094: PUSH CS
SYS0095: CALL 02E6

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

SYS0098: PUSH CS
SYS0099: CALL 0364

Calls SYS:0364 Reset Function and use Input's OpenFunc to open it. Continues to SYS:009C Initialize Output File.

See also: Text File Type, SYS:0263 empty string, SYS:02E6 Assign Function, SYS:0364 Reset/Rewrite Function or go back