VOGONS


First post, by retrocanada76

User metadata
Rank Member
Rank
Member

I noticed the Super PC/XT Bios didn't work for my 5150 especially when activating the IBM_PC=1 flag or using the PC/XT version with mono card.

It turns out it reads the SW1 wrong, there is the fix:

ifdef IBM_PC ; Read 5150 switch config
mov al, 0CCh
out dx, al ; Reset keyboard
in al, 60h ; Read config switches
shr al, 4 ; BUGFIX, rotate switches to PC-XT position
mov ah, al

The flags on 5150 are in the upper nibble, the PC/XT gets them from a lower nibble in other port, That's the mistake.

Now it works with any display and boots correctly from floppy.

Reply 2 of 3, by alvaro84

User metadata
Rank Member
Rank
Member
retrocanada76 wrote:
As someone else pointed out in other forum SHR AL,4 is not valid but TASM is expanding to to 4 SHR AL,1. […]
Show full quote

As someone else pointed out in other forum SHR AL,4 is not valid but TASM is expanding to to 4 SHR AL,1.

The correct would be:

MOV CL,4
SHR AL,CL

You know that the latter corrupts CX (CL), right?
There are situations where it's okay but you shouldn't make your compiler default to it.

Shame on us, doomed from the start
May God have mercy on our dirty little hearts