Reply 80 of 151, by superfury
One thing that's odd is this: even though the Generic Turbo XT BIOS shows it exists, it doesn't supply anything for it. It just detects it, displays it's there and continues doing other things. Couldn't the maker have added full BIOS support for that RTC chip if he already planned on displaying it (seemingly 'supporting' it by the BIOS)? He could just as easily implement an interrupt 1Ah BIOS interrupt for that chip(actually all three chips seem upwards compatible at least)?
All it has is this simple routine:
;---------------------------------------------------------------------------------------------------
; Interrupt 1Ah - Time Of Day Clock
;---------------------------------------------------------------------------------------------------
entry 0FE6Eh ; IBM entry, time_of_day clock
proc int_1A far
sti ; User time_of_day BIOS service
push ds
push ax
mov ax, 40h
mov ds, ax
pop ax ; Get request type
cli ; pause clock
or ah, ah
jz @@read ; Read time, ah=0
dec ah
jnz @@end ; invalid request
@@set:
mov [ds:6Ch], dx ; Set time, ah=1
mov [ds:6Eh], cx ; set time high
mov [byte ds:70h], 0 ; not a new day
jmp short @@end
@@read:
mov cx, [ds:6Eh] ; Read low order time
mov dx, [ds:6Ch] ; high order time
call @@reset ; Read resets overflow
@@end: sti ; Resume clock
pop ds
iret
@@reset:
mov al, [ds:70h] ; Zero the overflow and return
xor [ds:70h], al ; previous status in flags
retn
endp int_1A
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io