flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Booting from floppydisk. Goto page Previous 1, 2 |
Author |
|
Dex4u 19 Apr 2006, 21:53
Please do not make me remember this stuff, most of us want to avoid it
Segments and offsets are just a method of specifying a location in memory. EG: 3CE5:502A ^^^^ ^^^^ SEG OFS Okay, here's the specs: An OFFSET = SEGMENT X 16 A SEGMENT = OFFSET / 16 Some segment registers are: CS, DS, ES, SS and FS, GF - Note: The last 2 are 386+ registers. Some offset registers are: BX, DI, SI, BP, SP, IP - Note: When in protected mode, you can use any general purpose register as an offset register - EXCEPT IP. Some common segments and offsets are: CS:IP - Addres of the currently executing code. SS:SP - Address of the current stack position. So when we refer to segments and offsets, we do so in the form: SEGMENT:OFFSET A good example would be: A000:0000 - which actually corresponds to the top left of the VGA screen in 320x200x256 color mode. Best to read up on it, there loads of tuts. |
|||
19 Apr 2006, 21:53 |
|
TDCNL 22 Apr 2006, 13:30
So if I get it correctly, in 32-bit you could also use [0xA0000] as the VGA memory pointer, and in real mode there are limits of usage with registers as pointers
_________________ :: The Dutch Cracker :: |
|||
22 Apr 2006, 13:30 |
|
Borsuc 22 Apr 2006, 13:37
TDCNL wrote: So if I get it correctly, in 32-bit you could also use [0xA0000] as the VGA memory pointer, and in real mode there are limits of usage with registers as pointers it's also important to remember that you can use segments even in 32-bit mode. so, yes, you could use 0x0000:0xA0000 for VGA, just as you could use any other combination |
|||
22 Apr 2006, 13:37 |
|
Dex4u 22 Apr 2006, 14:30
To help you, take a look here: http://board.flatassembler.net/topic.php?t=5043&start=0
The first demo code is for Dos and then i have converted it to run on Dex4u OS ( which is 32bit pmode). |
|||
22 Apr 2006, 14:30 |
|
TDCNL 22 Apr 2006, 16:44
Dex4u wrote: To help you, take a look here: http://board.flatassembler.net/topic.php?t=5043&start=0 Thanks _________________ :: The Dutch Cracker :: |
|||
22 Apr 2006, 16:44 |
|
anton 05 Jun 2006, 03:37
Nyrre wrote: Hi, I'm new to these forums . I really recommend/advice you use Flash USB Drive for this purpose (If you have one). It works like Hard Drive (if you have modern motherboard). I really do not recommend/advice you use floppy disks (for many reasons). |
|||
05 Jun 2006, 03:37 |
|
anton 05 Jun 2006, 03:45
Nyrre wrote: Thank you for your advice. Add this before cli instruction(or somewhere else before setting PE flag in CR0) ; disable NMI in al, 70h or al, 80h out 70h, al It disables NMI - nonmaskable interrupt. |
|||
05 Jun 2006, 03:45 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.