flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
bitshifter 24 Nov 2009, 18:47
|
|||
![]() |
|
Coddy41 24 Nov 2009, 20:03
Yes, it somewhat helped me, I suppose I should have done a better search...
I found the solution to my problem. I just do this: Code: mov bx, 0x0600 mov es, bx mov bx, 0x0000 ; K, kernel loaded @ [0600:0000] thanks... _________________ Want hosting for free for your asm project? You can PM me. (*.fasm4u.net) |
|||
![]() |
|
windwakr 24 Nov 2009, 20:30
I think it would be a smarter idea to load your kernel into a segment that is a multiple of 1000, that way you can't accidentally write to it when doing something else.
When you stick to 1000's for the segment, it makes everything so much easier. You then just have 65,536 bytes you can write to, and then move onto the next 1000 segment. With something like 0600:0000, things just get complicated. Each point in memory can be accessed by up to 4,096 different segment:offset pairs! So, for me at least, I keep the segment as a multiple of 1000. http://mirror.href.com/thestarman/asm/debug/Segments.html If you want it loaded there, load it to 0:6000. Same place in memory, and keeps segment:offset nice. |
|||
![]() |
|
Coddy41 24 Nov 2009, 20:45
I didn't think of that..
OK, so i will load the second stage to 1000:0000 and my kernel to 2000:0000. And if I load any progs I should also load it to 3000:0100. Or since stage two is so small I could load it at 0500:0000 and load the kernel at 1000:0000. Edit: oh, thanks for the link, didn't see it there ![]() _________________ Want hosting for free for your asm project? You can PM me. (*.fasm4u.net) |
|||
![]() |
|
windwakr 24 Nov 2009, 21:25
Coddy41 wrote: Or since stage two is so small I could load it at 0500:0000... 0000:5000 would be a better choice. It is the exact same point in memory, but wouldn't start overwriting the 1000:xxxx's at the end of it. At 0500:B000 and up, you would be overwriting whats at 1000:0000 and up. Although, like you say, your stage two wouldn't be that big, so I guess it's up to you. I would love to find the man who invented the Segment:Offset addressing and punch him in the face. ![]() |
|||
![]() |
|
Coddy41 24 Nov 2009, 22:07
Yeah, I'll just go with the first idea in my previous post. Thanks for all the help
![]() Quote: I would love to find the man who invented the Segment:Offset addressing and punch him in the face. Yes. ![]() _________________ Want hosting for free for your asm project? You can PM me. (*.fasm4u.net) |
|||
![]() |
|
tom tobias 25 Nov 2009, 11:48
windwakr wrote: ...I would love to find the man who invented the Segment:Offset addressing and punch him in the face.... Sonic Retro wrote: It is important to note that even though the 68000 had a 16bit ALU, addresses were always manipulated by 32bit instructions. I.e. not only was the address space 32bit, but flat addressing was used. Contrast this to the 8086, which had 20bit address space, but could only access 16bit (64 kilobyte) chunks without resorting to slow extra instructions. The clever 68000 compromise was that in spite of databus and ALU width being 16bit, address arithmetic always is 32bit |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.