VOGONS


First post, by GigAHerZ

User metadata
Rank Oldbie
Rank
Oldbie

I think it should be possible, yet, i have absolutely no knowledge in that low level programming. Therefore, maybe one of you can help me out?

I would like to match some jumpers on board with some register values in chipset using datasheet. For that, i need a way to read certain addresses to see, if some bits have flipped, when i have changed the jumper settings. (obviously, jumpered bits are read-only)

Maybe someone can help me out and show, how to use dos debug for example to read some register addresses? Let's say, i want to see all 8 bits on register 60h in chipset. What should i write?

Thank you!

"640K ought to be enough for anybody." - And i intend to get every last bit out of it even after loading every damn driver!

Reply 1 of 8, by Tiido

User metadata
Rank l33t
Rank
l33t

Start QBASIC instead and use the INP and OUT functions to do things

OUT &H60, 123 'write 123 to $60
PRINT INP(&H60) 'show content of $60 on screen

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 2 of 8, by GigAHerZ

User metadata
Rank Oldbie
Rank
Oldbie

Seems like i've been slightly off track.
I found this thing here in the forum: "As explained in the data sheet, the chipset registers are accessed through port I/O. $22 is the index port and $23 is the data port."

So what would that mean? Always write to 22h and then read back from 23h?

Last edited by GigAHerZ on 2020-12-23, 15:17. Edited 2 times in total.

"640K ought to be enough for anybody." - And i intend to get every last bit out of it even after loading every damn driver!

Reply 3 of 8, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

well if you wanted to set a value to a port, you wouldnt use debug necessarily unless you wanted to write asm that way.

start debug and type;


a
mov dx,060
mov al,0FF
out dx,al
mov ah,04c
int 021

rip
100
g

the "a" is for assemble, then you have lines of code setting the port and the value in al
the 4c/cd21 is to exit the app

rip sets the instruction pointer to 100
g runs the program

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 4 of 8, by GigAHerZ

User metadata
Rank Oldbie
Rank
Oldbie
GigAHerZ wrote on 2020-12-23, 14:41:

Seems like i've been slightly off track.
I found this thing here in the forum: "As explained in the data sheet, the chipset registers are accessed through port I/O. $22 is the index port and $23 is the data port."

So what would that mean? Always write to 22h and then read back from 23h?

I ask and i answer: Yes, this is how it works. Write register address to 22h and then read 23h for the value. Thanks, @Tiido, as you gave everything i needed, both reading and writing.

"640K ought to be enough for anybody." - And i intend to get every last bit out of it even after loading every damn driver!

Reply 7 of 8, by GigAHerZ

User metadata
Rank Oldbie
Rank
Oldbie
maxtherabbit wrote on 2020-12-23, 15:54:

are you familiar with the program CTCHIP34? if your chipset is supported it provides an easy front end to changing chipset register values

Now i know! Yep, i can see same values there. Thanks!

"640K ought to be enough for anybody." - And i intend to get every last bit out of it even after loading every damn driver!

Reply 8 of 8, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie
maxtherabbit wrote on 2020-12-23, 15:50:

you can do direct port IO in DEBUG, no need for BASIC or any assembly

-i 60

-o 60 FF

heh I never knew that one! I use debugx which is a better debug ... 386 regs, and indeed the I (w|d) port functions.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--