Don't clobber AH when calling getc; when returning with CF=1 (EOF),
always return with AL=0.
and bx,bx
jnz .have_unget
- mov ax,real_mode_seg ; Borrow the real_mode_seg
- mov es,ax
+ mov si,real_mode_seg ; Borrow the real_mode_seg
+ mov es,si
+
.got_data:
sub word [di+gc_bufbytes],1
jc .get_data ; Was it zero already?
; to read the file.
mov [di+gc_bufbytes],cx
popad
+ xor al,al ; Return a predictable zero
stc
jmp .ret