flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Fasm Directive

Author
Thread Post new topic Reply to topic
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 03 Jan 2009, 12:49
Hello,
There is some fasm directive to put Low and High part of 32 bit offset address
in memory location declared as word ?
Example:
Code:

use32
Label_32:

;-----------------
; IDT Structure
;-----------------

Low          DW Label_32 AND 0FFFFH                  ; 15:0 Offset
Selector     DW ?
Other        DB ?
Other2       DB ?
High         DW Label_32 SHR 16                       ; 31:16 Offset

    

I use this code and work fine but i don't have ever learn
fasm directive and so on ,i have improvised this code and
immediately it's working fine,there is some more specific ?
This is for my hobby OS that i have started some time ago,
i always coded in MASM ,but i have choice FASm for code my toy OS Smile

_________________
Nil Volentibus Arduum Razz
Post 03 Jan 2009, 12:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 03 Jan 2009, 12:53
No. There is no low or high in fasm syntax.
Post 03 Jan 2009, 12:53
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 03 Jan 2009, 12:59
The way you do it is the right way. Just be warned that if you compile to certain formats (MS COFF, PE, ELF, etc...), this might not work, because the format doesn't support such relocation.
Post 03 Jan 2009, 12:59
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 03 Jan 2009, 13:02
Thanks vid for warning , don't worry this is pure flat
binary ,it's for my personal toy OS

_________________
Nil Volentibus Arduum Razz
Post 03 Jan 2009, 13:02
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.