flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 21 Apr 2004, 20:37
Code: times 512-$ db 0 will work with fasm. |
|||
![]() |
|
adefeo 23 Apr 2004, 16:32
Privalov wrote:
I tried this and it does not work. It returns an error about an invalid something (i forget ) I am using the latest Linux version of FASM on a Debian Linux 2.1 system with kernel 2.2.12 Why is it not working ![]() ![]() |
|||
![]() |
|
roticv 23 Apr 2004, 16:38
Weird the following work for me (part of my hack and slash bootloader)
Code: times 512-$-2 db 0 db 55h,0aah ; boot signature |
|||
![]() |
|
Tomasz Grysztar 23 Apr 2004, 17:36
First, this can be used mainly with binary output format only - when you use some relocatable format (like object files, but also PE), you cannot use $ symbol this way, because it doesn't have fixed value.
Second, expression 512-$ will be of course negative when $ is larger than 512 and you will get error in such situation, too. |
|||
![]() |
|
asmdemon 23 Apr 2004, 23:14
this is what i always use and it works all the time
Code: times $-510 db 0 db 0x55h, 0xaa ; boot signature _________________ It is better to be on the right side of the devil than in his path. |
|||
![]() |
|
Daemon 24 Apr 2004, 05:59
Why not to use a 'rb' directive ?
btw question to Privalov: is this directive always leaves zeros or not? I mean is it possible that in rb 1024 can be not only zeros but some random data ?? |
|||
![]() |
|
vid 24 Apr 2004, 07:01
manual says you should always treat value as --undefined--, and that is. If "rb" is used at end of file, it will just reserve space in file header, and thus when you run program memory will contain data remained from previous owner of this part of memory
|
|||
![]() |
|
adefeo 26 Apr 2004, 19:48
Thanks! I'll try it when I get home from school.
|
|||
![]() |
|
adefeo 27 Apr 2004, 19:22
NEITHER of the methods work... I'm Confuzzled...What's wrong:?:
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.