flat assembler
Message board for the users of flat assembler.

Index > DOS > Debugging ROM BIOS / register offsets

Author
Thread Post new topic Reply to topic
Paul6253



Joined: 19 Oct 2003
Posts: 31
Location: NY
Paul6253 21 Feb 2004, 06:55
Any Ideas on how I could play with the BIOS setup util?
I'd like to map the code to a buffer and mod it. Any ideas?

Also, how do seg:offset work in debug?
I wanted to do something like
mov byte al,[f000:0]
thats an error -- complains about closed bracket
As an alternative I tried putting f000:0000 into eax
like
xor eax,eax
mov ax,f000
rol eax,16
;eax = f0000000
Thats not a seg:offset either!

Thanks for help

_________________
Plez xcuce mi spelng
Post 21 Feb 2004, 06:55
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 21 Feb 2004, 11:39
mov byte al,[f000:0]
"f000" is not a number, it starts with letter so it is symbol. use 0F000h or 0xF000 or $F000.

you want to grab BIOS's code and play with it?
Post 21 Feb 2004, 11:39
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Bitdog



Joined: 18 Jan 2004
Posts: 97
Bitdog 21 Feb 2004, 17:36
MOV AX, BYTE PTR [F000]

seg over rides consist of the seg before the instruction
But you can't put a seg reg infront.
Seg regs CS, DS, ES, etc have a value, and that value is placed before
DB 66
MOV AX, BYTE PTR [F000]
or something like that,
you'll want the value of DS seg reg,
so assemble a blank.asm to .com that has two lines of code in it.
MOV BYTE [100h],5
MOV BYTE [DS:100h],5
then run it through a debugger and you'll see the machine code value for
DS or any other seg reg.
Then use that in debug.exe as a pre instruction seg over ride.
Debug.exe works as a disassembler, and from it's output you can learn
how to use it as an assembler. I have a debug disassembler for you....
http://bitdog.home.att.net/files/fasmenv.zip
look for the DISBUG dir
DISBUG MY.COM 45
disassembles a 45 byte .com file named MY.COM
it makes assemble batch files and two source .asm files. .BUG & .DAT ?
It comes with its Fasm .asm source code.

I hope it helps somehow
Bitdog
Post 21 Feb 2004, 17:36
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 21 Feb 2004, 19:10
Embarassed , yes, sorry. It so long from when i was working with segments last time...
but you must use *h/0x*/$* anyway.

so it would be somethink like
Code:
mov ax,0F000h
mov dx,ax
mov al,[ds:1]
    
Post 21 Feb 2004, 19:10
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.