digitalmars.D.learn - Inserting raw data in inline asm
- Leopold Walkling (1/1) Jan 04 2007 What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for...
- Jarrett Billingsley (4/5) Jan 04 2007 Doesn't your topic answer your question?
- Leopold Walkling (3/12) Jan 04 2007 I found out what it does, but for what reason should I insert a raw
- BCS (7/19) Jan 04 2007 for doing something like this in ASM;
- Frits van Bommel (13/38) Jan 04 2007 I think you'll find you'd put the floats into instructions that move
- Thomas Kuehne (15/16) Jan 04 2007 -----BEGIN PGP SIGNED MESSAGE-----
What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for?
Jan 04 2007
"Leopold Walkling" <leopold_walkling web.de> wrote in message news:enjsji$kjj$1 digitaldaemon.com...What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for?Doesn't your topic answer your question? I guess they're for inserting static data without using D syntax..
Jan 04 2007
Jarrett Billingsley schrieb:"Leopold Walkling" <leopold_walkling web.de> wrote in message news:enjsji$kjj$1 digitaldaemon.com...I found out what it does, but for what reason should I insert a raw float into the machine code?What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for?Doesn't your topic answer your question? I guess they're for inserting static data without using D syntax..
Jan 04 2007
Leopold Walkling wrote:Jarrett Billingsley schrieb:for doing something like this in ASM; float a, b; a = b * 7.35235532; or maybe float[] arr;"Leopold Walkling" <leopold_walkling web.de> wrote in message news:enjsji$kjj$1 digitaldaemon.com...I found out what it does, but for what reason should I insert a raw float into the machine code?What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for?Doesn't your topic answer your question? I guess they're for inserting static data without using D syntax..
Jan 04 2007
BCS wrote:Leopold Walkling wrote:I think you'll find you'd put the floats into instructions that move them to the coprocessor (or whatever, never used floats from asm). But I'm pretty sure you wouldn't want to just paste the raw binary representation of a float into a spot where the cpu will expect a new instruction to start. That sounds like a recipe for disaster... I guess those pseudo-ops are not very useful in an inline assembler. Though I suppose you could jump over them and use them as values in memory from other instructions[1]. Or you could use them to generate opcodes for (new) instructions that the compiler doesn't (yet) know about :)... [1]: which is probably as good as useless, since you typically can't modify the code section, which is where they'd be stored...Jarrett Billingsley schrieb:for doing something like this in ASM; float a, b; a = b * 7.35235532; or maybe float[] arr;"Leopold Walkling" <leopold_walkling web.de> wrote in message news:enjsji$kjj$1 digitaldaemon.com...I found out what it does, but for what reason should I insert a raw float into the machine code?What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for?Doesn't your topic answer your question? I guess they're for inserting static data without using D syntax..
Jan 04 2007
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Leopold Walkling schrieb am 2007-01-04:What are those "pseudo-ops" in inline asm like db, dw, dd, dl, df... for?sample: asm{inc EAX;} and asm{db 0x40;} result in the same output, because the x86 encoding of "inc EAX" is 0x40. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFnY7aLK5blCcjpWoRAjH+AJ9mEzCj8/h679vEEtAbQ7qU8IreIACfSRIf EvPCKdOFMhC4wUCZ/FGCQO0= =YE1e -----END PGP SIGNATURE-----
Jan 04 2007