Accessing Bios routines from rom at INIT?

By WORP3

Paladin (804)

WORP3's picture

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.

Login or register to post comments

By sd_snatcher

Prophet (3092)

sd_snatcher's picture

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.

By WORP3

Paladin (804)

WORP3's picture

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

By WORP3

Paladin (804)

WORP3's picture

08-04-2018, 18:42

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

By Grauw

Ascended (8509)

Grauw's picture

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.

By WORP3

Paladin (804)

WORP3's picture

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.

By gdx

Prophet (3084)

gdx's picture

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.