logs archiveIRC Archive / Undernet / #asm / 2006 / January / 18 / 1
_exe
UUUUUJU.
Hello EwIck.
EwIck
yo
_exe
How are you doing?
EwIck
good
leona
Leona_K
yep
EwIck
yo
Leona_K
hi sweet pie
EwIck
I'm not all pie
Leona_K
hi half sweet pie
         

EwIck
a'ight I'll take it
Leona_K
oh yes! i got it! right at you, "guys in the math channel"
Alexande
hi
in 16bit assembly, how i can mov the value of es:0000 to a register, and mov the value in a register to es:0000 ?
_exe
.asm16 mov bx, byte ptr es:[0000]
wisebot
_exe: Invalid instructions, impossible to assemble this code
_exe
.asm16 mov bx, byte es:[0000]
wisebot
_exe: Invalid instructions, impossible to assemble this code
_exe
Ugh.
.asm16 mov bx, es:[0000]
wisebot
_exe: Invalid instructions, impossible to assemble this code
_exe
.asm16 mov bx, [es:0000]
wisebot
_exe: 268B1E0000
_exe
.asm16 mov bh, byte [es:0000]
wisebot
_exe: 268A3E0000
_exe
.asm16 mov byte [es:0000], bh
wisebot
_exe: 26883E0000
Alexande
_exe: thanks
_exe
No prob.
TCA
That is, of course, only for nasm
Since that's what wisebot uses
Int3
Hi Idle peoples
stool
.weather toronto, ontario
         

wisebot
Weather for Toronto, Ontario(last update: 10:00 AM EST on January 18, 2006) | Temperature: 37°F | Windchill: 27°F | Humidity: 87% | Dew Point: 34°F | Sunrise: 7:46 AM EST | Sunset: 5:10 PM EST | Moon Rise: 9:29 PM EST | Moon Set: 10:01 AM EST
nipe
hi, i know this is a very open question, but i'm new to assembler and was wondering which compiler would be good to go with? I was looking at nasm but then i couldn't get some code to work from reading a tutorial that used tasm, but tasm doesn't look like its been updated in years (?), and masm looks like you need another ms visual programming language installed first?
_exe
I'd choose fasm.
nipe
flat assembler?
_exe
Yup.
nipe
how is that better than the others?
_exe
I think you have more "control" over the file you generate.
However, masm it's a good choice too if you're planning to do win32 asm.
nipe
from what i've seen (i haven't used masm) is that yo uneed extra libraries (eg have visual c?) installed for it to work?
stool
nah
nipe
thanks for all your advice. i've done some hw too and i think i might stick with nasm, seems to be able to code assembler for bsd too
stool
thats if you want to produce win32 executables, the platform sdk and all the libs you need is downloadable in msdn anyway
banderass
ted
_exe
God, parsing Yahoo! results is insane.
OriginalCopy
hi
objdump -D file.elf shows at address 804811C: 2E which means cs, and at 804811D: 36 which means the assembly instruction "ss", while ndisasm disassembles "2E360000" as a single instruction: add [ss:bx+si],al, which one should i trust, what iss that sequence of bytes actually doing ? (kinda offtopic, but has to do with binary code)
Alexande
how i can put the value in ES into CS ? (in 16bit assembly)
TCA
hm
.dasm16 2E360000
wisebot
TCA:
-------------------------------------------------
00000000 2E360000 add [ss:bx+si],al
-------------------------------------------------
dbtid
did someone answer OriginalCopy's question?
TCA
.dasm16 2e36
wisebot
TCA:
OriginalCopy
heh, wisebot :)
wisebot
-------------------------------------------------
00000000 2E db 0x2E
00000001 36 db 0x36
-------------------------------------------------
TCA
.dasm16 362e
wisebot
TCA:
-------------------------------------------------
00000000 36 db 0x36
00000001 2E db 0x2E
-------------------------------------------------
Eonid
2E is a segment override prefix for CS, and 36 is the override for SS, these aren't exactly standalone instructions because they'd work with the specified segment instead of the default segment an instruction would work with otherwise.... the code should add the content of AL to the content of [ss:bx+si], and store it at [ss:bx+si]
TCA
It's a garbage instruction
Nobody adds al to ss:bx+si
It's probably data of some sort
Alexande
how i can put the value in ES into CS ? (in 16bit assembly)
OriginalCopy
and another dumb question: the actual code (the program) "starts" at address 0, and the process at the entry point, in the case of the elf format at 0x8048000, as objdump says:
LOAD int_main_void.o
0x0000000008048000 PROVIDE (__executable_start, 0x8048000)
0x00000000080480f4 . = (0x8048000 + SIZEOF_HEADERS)
and above that address is data instructing the kernel what and how to do with the program, to make it a process, right ?
TCA
I'm not familiar enough with ELF to be able to answer that
dbtid
OriginalCopy: if you dig up the docs for ELF, you'll see what all the headers mean; there are a TON of them.
OriginalCopy
dbtid: you know?
dbtid
i once wrote a parser for ELF
i got about 25% done with all the sh*t in the doc and quit; it wasn't worth doing it all.
there are a TON of options.
i don't know OriginalCopy
OriginalCopy
ok many thanks to all, I was just that enthusiastic about reading http://www.nondot.org/sabre/os/files/Executables/ELF.pdf so I couldn't wait someone to confirm I'm on the right path
stool
alex: mov ax, es mov cs, ax, under real mode this should do it, however in protected im not sure the processor will let you modify cs
DEADBEEFh
yo
stool
.asm16 retf
wisebot
stool: CB
stool
.asm16 add ss:[si+bx], al
wisebot
stool: Invalid instructions, impossible to assemble this code
stool
.asm16 mov al, ds:[si+bx]
wisebot
stool: Invalid instructions, impossible to assemble this code
stool
.asm16 mov ax, ds:[si+bx]
wisebot
stool: Invalid instructions, impossible to assemble this code
stool
.asm16 mov ax, [ds:si+bx]
wisebot
stool: 3E8B00
stool
.asm16 add [ss:si+bx], al
wisebot
stool: 360000
stool
.asm16 add [ss:bx+si], al
wisebot
stool: 360000
stool
.dasm16 2E0000
wisebot
stool:
-------------------------------------------------
00000000 2E0000 add [cs:bx+si],al
-------------------------------------------------
stool
yeah garbage code heh heh
i'm bored.
.asm16 push 0CC00000h
wisebot
stool: 680000
stool
.asm16 int 19h
wisebot
stool: CD19
stool
.asm16 push cs
wisebot
stool: 0E
stool
.asm16 pop cs
wisebot
stool: 0F
Alexande
how i can jump to cs:0000h ?
in 16bit
TCA
hm
jmp far cs:0000
?
push cs
push 0000
retf
?
Alexande
that sounds good
thanks
TCA
I suppose "push 0000 /// ret" would work
stool
alex why did you wanted to change cs anyway.. curious..
Alexande
to change the segment and offset to es:[0000]
ill use call far
edcba
jmp 0
Alexande
isnt jmp 0 relative?
edcba
yes
Alexande
so it will jump no where?
CurrentOffset + 0
edcba
you asked to jump to cs:0
Alexande
to the start of the segment
edcba
the assembler won't assemble it as EB 00
Alexande
jmp 0 = CurrentOffset + 0
edcba
.asm jmp 0
wisebot
edcba: E9FBFFFFFF
edcba
.asm jmp short 0
wisebot
edcba: Invalid instructions, impossible to assemble this code
edcba
jmp $ = CurrentOffset + 0
jmp 0 jumps to 0
Alexande
how i can mov the value in es:0000 into a register?
« prev 1 2 next »