flat assembler
Message board for the users of flat assembler.
Index
> Linux > hello! about linux fasm segment address a problem Goto page Previous 1, 2 |
Author |
|
kerr 12 Apr 2016, 09:21
revolution wrote: DS is automatically used when you don't specify it. The following are the same: Oh, I want to ask if you program run in 0x80004000 address ,But you want Specify it visit your data segment address 0x80001000, how do you make it? _________________ I hope we will be good friends. |
|||
12 Apr 2016, 09:21 |
|
l_inc 13 Apr 2016, 21:05
Quote: But you want Specify it visit your data segment address 0x80001000, how do you make it? mov eax,[0x80001000] _________________ Faith is a superposition of knowledge and fallacy |
|||
13 Apr 2016, 21:05 |
|
kerr 17 Apr 2016, 04:16
l_inc wrote:
Oh,I probably know what you mean! Your's speak 32bit is no segment address + offset address? is Direct call Physical address? Code: mov eax,0x80001000 call eax ###################### Is it right _________________ I hope we will be good friends. |
|||
17 Apr 2016, 04:16 |
|
l_inc 17 Apr 2016, 10:53
kerr
Quote: Your's speak 32bit is no segment address + offset address? It's not about 32 bit. It's about Linux. It sets segment base address = 0 for all relevant segments. Quote: is Direct call Physical address? It's not physical address. It's virtual address. In Linux you cannot work with physical addresses directly, because it works with enabled paging. Quote: Is it right Yes. But if your code is not relocatable then you can just do call 0x80001000 . _________________ Faith is a superposition of knowledge and fallacy |
|||
17 Apr 2016, 10:53 |
|
kerr 19 Apr 2016, 01:57
l_inc wrote: kerr oh yeah! well, i can see the writing on the book,i try to write operating system. is unable to compile. Code: jmp _start ;0x8:0x400 stack times 128 db 0 _start: mov ax,ds mov ds,ax mov ss,ax mov es,ax mov fs,ax mov gs,ax mov eax,stack mov esp,eax xor eax,eax _________________ I hope we will be good friends. |
|||
19 Apr 2016, 01:57 |
|
l_inc 19 Apr 2016, 11:16
kerr
Quote: i try to write operating system That's what you should have told at the very beginning. You also shouldn't have created your topic in the Linux subforum. The answers would have been completely different. Quote: unable to compile You cannot use the word stack as label name. It's reserved. You also cannot declare a label using the times directive: put colon after the label name or use either db 128 dup 0 or rb 128 . _________________ Faith is a superposition of knowledge and fallacy |
|||
19 Apr 2016, 11:16 |
|
revolution 19 Apr 2016, 14:31
kerr: If you are writing an OS boot loader then your format line should look like this:
Code: format binary ... |
|||
19 Apr 2016, 14:31 |
|
kerr 20 Apr 2016, 03:54
l_inc wrote: kerr oh i don't know! I thought it was compiled on Linux! _________________ I hope we will be good friends. |
|||
20 Apr 2016, 03:54 |
|
kerr 20 Apr 2016, 07:31
revolution wrote: kerr: If you are writing an OS boot loader then your format line should look like this: yeah So I'm confused The use of the book is the NASM compiler,I try to use FASM how can not compile. _________________ I hope we will be good friends. |
|||
20 Apr 2016, 07:31 |
|
Trinitek 20 Apr 2016, 07:41
NASM and FASM are different assemblers with different syntax and keywords. Perhaps you should use NASM if you're learning from a NASM book?
|
|||
20 Apr 2016, 07:41 |
|
kerr 23 Apr 2016, 02:10
Trinitek wrote: NASM and FASM are different assemblers with different syntax and keywords. Perhaps you should use NASM if you're learning from a NASM book? Yes, I want to use FASM to rewrite the Nasm syntax _________________ I hope we will be good friends. |
|||
23 Apr 2016, 02:10 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.