i have some problem with AT&T assembly, really looking forward to some help:
1.how to define macros?
#define BOOTSEG $0x7c00
mov BOOTSEG, %ax
i just want to store the value 0x7c00 in AX, is this right?
2.how to jump to some place?
#define INITSEG $0x9000
jmp go(INITSEG)
go:
mov BOOTSEG, %ax
i want to jump to INITSEG+go, how to write the jump instructions?
where can i get a manual or something that teach me assembly in AT&T format? most of them always mix Intel and AT&T together, i'm confused.
any help would be appreciated, thanks.
1.how to define macros?
#define BOOTSEG $0x7c00
mov BOOTSEG, %ax
i just want to store the value 0x7c00 in AX, is this right?
2.how to jump to some place?
#define INITSEG $0x9000
jmp go(INITSEG)
go:
mov BOOTSEG, %ax
i want to jump to INITSEG+go, how to write the jump instructions?
where can i get a manual or something that teach me assembly in AT&T format? most of them always mix Intel and AT&T together, i'm confused.
any help would be appreciated, thanks.
Jonathan Bartlett's "Programming From the Ground Up" uses AT&T syntax:
http://savannah.nongnu.org/projects/pgubook/
Doesn't cover bootsectors, but you don't want to tackle a bootsector until you've got your assembler well under control and understand segmented memory model programming anyway (IMO).
Best,
Frank
http://savannah.nongnu.org/projects/pgubook/
Doesn't cover bootsectors, but you don't want to tackle a bootsector until you've got your assembler well under control and understand segmented memory model programming anyway (IMO).
Best,
Frank
thanks a lot man, i'll get that book.
cheers.
cheers.