Accessing Bios routines from rom at INIT?

Door WORP3

Paladin (806)

afbeelding van WORP3

07-04-2018, 16:46

Just wondering if it's allowed to call directly to the BIOS routines(calls) from a program that is running inside a ROM (And is started from INIT (&H4002) during initialization) ?
I want to be able to prevent my rom from booting and want to read a specif key matrix rom with the SNSMAT (&H0141) function during bootup. After that I also want to set some specif video modes using the bios routines.
I guess this way is just valid but want t obe sure before Continuing.

Aangemeld of registreer om reacties te plaatsen

Van sd_snatcher

Prophet (3244)

afbeelding van sd_snatcher

07-04-2018, 16:56

Yes, you certainly can! The only thing that won't be available for you are the extensions (drive, etc) since the machine is still in the initialization phase.

If you need to use the extensions, you have to (gently) capture the HSTKE hook, and return to wait for initialization process to end.

Van WORP3

Paladin (806)

afbeelding van WORP3

07-04-2018, 17:05

sd_snatcher wrote:

Yes, you certainly can! The only thing that won't be available for you are the extensions (drive, etc) since the machine is still in the initialization phase.

If you need to use the extensions, you have to (gently) capture the HSTKE hook, and return to wait for initialization process to end.

Thanks !

Good to know about the HSTKE hook to be able to wait on complete reboot before accessing extensions. Not that I need them for this test. I just want to have a methode to prevent rom booting so in case of a failure during this dirty ROM test, I always can boot the machine like normal Smile

Van WORP3

Paladin (806)

afbeelding van WORP3

08-04-2018, 18:42

Is there something known which registers may be changed (Or not) when returning after an ROM INIT call?

Van Grauw

Ascended (8737)

afbeelding van Grauw

08-04-2018, 18:53

Afaik you may change all. At least I haven’t ever noticed any issues, and I sure ain’t preserving any.

Van WORP3

Paladin (806)

afbeelding van WORP3

09-04-2018, 15:40

Grauw wrote:

Afaik you may change all. At least I haven’t ever noticed any issues, and I sure ain’t preserving any.

Ok, thanks.

Van gdx

Prophet (3317)

afbeelding van gdx

09-04-2018, 15:48

Attention, a few routines jump in the area above 3FFFh. These are the routines related to the Basic. This is the case for the routines SYNCHR and GETYPR for example.
If you want call the routines that call the disk, you can also start your program in machine with a DEFUSR from Basic in ROM.