flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Easy question

Author
Thread Post new topic Reply to topic
Giedrius



Joined: 13 Feb 2005
Posts: 40
Location: Lithuania
Giedrius 13 Feb 2005, 11:42
I can't get this to work:

Code:
times 512-($-$$) db 0
dw 0xAA55    


it gives me an error that goes like "Invalid Value"

And are there any sites dedicated to OS development in fasm? Or any other sites you could recommend for beginners?
Post 13 Feb 2005, 11:42
View user's profile Send private message Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85 13 Feb 2005, 12:05
Post 13 Feb 2005, 12:05
View user's profile Send private message Reply with quote
Giedrius



Joined: 13 Feb 2005
Posts: 40
Location: Lithuania
Giedrius 13 Feb 2005, 12:19
Thank you!
Post 13 Feb 2005, 12:19
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 13 Feb 2005, 17:48
I use this:
Code:
times 510- ($-start)  db 0dw 0xaa55    
Post 13 Feb 2005, 17:48
View user's profile Send private message Reply with quote
DennisCGc



Joined: 03 May 2004
Posts: 24
Location: Zoetermeer, The Netherlands
DennisCGc 13 Feb 2005, 21:24
Dex4u wrote:
I use this:
Code:
times 510- ($-start)  db 0
dw 0xaa55
    

Yeah, but the problem is that it's NASM only, and I think he wants the fasm version of the code Smile
But yeah, I noticed the 512 in the code Wink
Post 13 Feb 2005, 21:24
View user's profile Send private message MSN Messenger Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 341
Location: Trollhättan, Sweden
bubach 14 Feb 2005, 08:06
I use:

Code:
use16
org 0x7C00

boot:    

.....
Code:
          rb boot+512-2-$
          dw 0xAA55    
Post 14 Feb 2005, 08:06
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 14 Feb 2005, 11:04
Quote:
Yeah, but the problem is that it's NASM only, and I think he wants the fasm version of the code

The Dex4u's code is correct for fasm. The original one is not, because it uses $$ symbol. However I've decided to implement the $$ in future releases of fasm. You can get the 1.59 pre-release from the Download section and it has it already implemented (and documented in the new section "Addressing spaces" in documentation).
Post 14 Feb 2005, 11:04
View user's profile Send private message Visit poster's website Reply with quote
Giedrius



Joined: 13 Feb 2005
Posts: 40
Location: Lithuania
Giedrius 14 Feb 2005, 12:54
I'm glad to hear that! Keep up the good work.
Post 14 Feb 2005, 12:54
View user's profile Send private message Reply with quote
DennisCGc



Joined: 03 May 2004
Posts: 24
Location: Zoetermeer, The Netherlands
DennisCGc 14 Feb 2005, 15:37
Privalov wrote:
Quote:
Yeah, but the problem is that it's NASM only, and I think he wants the fasm version of the code

The Dex4u's code is correct for fasm. The original one is not, because it uses $$ symbol. However I've decided to implement the $$ in future releases of fasm. You can get the 1.59 pre-release from the Download section and it has it already implemented (and documented in the new section "Addressing spaces" in documentation).

Okay, thx for letting me know that Smile
Post 14 Feb 2005, 15:37
View user's profile Send private message MSN Messenger 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.