some minor stuff i dont understand

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

some minor stuff i dont understand

Post by Zacariaz »

Code: Select all

mydata segment para
pGDT32 label fword
; somedata
mydata ends
code16 segment para use16
is this the standard nasm way? if so im in trouble, if not, how would it be written in nasm?

I do by the way understand it (i think) but the syntax seems all wrong to me.

my best guess would be that i should look something like this

[BITS 16]
pGDT32:
; somedata

end of story, by i suspect that there is something very important i am missing here.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

the syntax looks like it comes from some funky nonstandard assembler (masm or tasm?). in nasm you'd have:

Code: Select all

SECTION .text
BITS 16
somelabel:
; code

SECTION .data
anotherlabel:
; data declarations
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

Combuster wrote:the syntax looks like it comes from some funky nonstandard assembler (masm or tasm?)
I wouldn't exactly call masm non standard (for that it is). It has been around for as long as the PC has, which is 26 years now.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

age doesn't imply usage :roll:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply