1. RE: asm.e atten: Pete E. or Mic
- Posted by "mic _" <stabmaster_ at hotmail.com> Apr 14, 2005
- 487 views
>ALL the string instructions like LODSB and etc. are incorrect. >they show the instruction followed by BYTE and etc. which is not correct. They work fine as is. Try assembling them and look at the output. >Also RET 8 is commented out ??? >and has to be fixed. RET imm16 is commented out (this was done by Pete, not me). I reckon the reason why is that it's a bit broken. If you put "RET "& on one line and "some_label: "& on the next, it'll think that "some_label" is a 16-bit immediate value. So you'd always have to use "RET 0" instead of just "RET ".
2. RE: asm.e atten: Pete E. or Mic
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 14, 2005
- 465 views
What is the date that you are using that assembles fine ? Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.ew Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
3. RE: asm.e atten: Pete E. or Mic
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 14, 2005
- 461 views
What is the date on the version of asm.e that you are using that assembles fine ? Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.ew Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
4. RE: asm.e atten: Pete E. or Mic
- Posted by "mic _" <stabmaster_ at hotmail.com> Apr 15, 2005
- 472 views
>What is the date on the version of asm.e that >you are using that assembles fine ? The latest modified one from the archives. But I don't think those instructions have ever been changed, so it should work with any version. I assembled LODSB and got #AC, which is correct.
5. RE: asm.e atten: Pete E. or Mic
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 15, 2005
- 472 views
mic _ wrote: > > >What is the date on the version of asm.e that > >you are using that assembles fine ? > > The latest modified one from the archives. But I don't think those > instructions have ever been changed, so it should work with any version. I > assembled LODSB and got #AC, which is correct. > > This code : -- =================================== peekb: mov esi, esp ; addr to peek xor eax, eax ; lodsb ; db #C2,#04,#00 ; ret 4 -- ====================================== Generates this: -- ====================================== #89,#E6, addr to peek #31,#C0, xor eax, eax #AC,#C2,#00,#00,#00, lodsb #C2,#04,#00, ret 4 -- ====================================== The LOSB should generate JUST #AC Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.ew Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
6. RE: asm.e atten: Pete E. or Mic
- Posted by "mic _" <stabmaster_ at hotmail.com> Apr 15, 2005
- 459 views
>-- ====================================== > #89,#E6, addr to peek > #31,#C0, xor eax, eax > #AC,#C2,#00,#00,#00, lodsb > #C2,#04,#00, ret 4 >-- ====================================== I think it's db that's broken, not lodsb. "nop db #C2,#04,#00 " gave me #90,#C2,#00,#00,#00, -- nop #C2,#04,#00, -- db #C2,#04,#00 which is incorrect. I've never looked at the code that handles db:s since I've never used them myself, so Pete would be better suited to explain why this happens.
7. RE: asm.e atten: Pete E. or Mic
- Posted by Pete E <euphoria at eberlein.org> Apr 15, 2005
- 469 views
- Last edited Apr 16, 2005
mic _ wrote: > I think it's db that's broken, not lodsb. > "nop db #C2,#04,#00 " gave me > > #90,#C2,#00,#00,#00, -- nop > #C2,#04,#00, -- db #C2,#04,#00 > > which is incorrect. I've never looked at the code that handles db:s > since > I've never used them myself, so Pete would be better suited to explain > why > this happens. Mic, that's right. I found the bug. When the parser reads an instruction, it reads up to three arguments after the instruction name. The problem is that it's not stopping at the "db" when reading the arguments. The first immediate value after the "db" is what is getting added the machine code, and causing the miscoded instruction. Here's the fix. Find the lines: if atom(t1) then param = append(param, t1) and change it to: if atom(t1) and not and_bits(t1,DATA) then param = append(param, t1) This isn't a problem in my new assembler, which is still unfinished. If you want to play with a pre-release of it, download from my euphoria page, http://eberlein.org/euphoria/ Regards, Pete E.
8. RE: asm.e atten: Pete E. or Mic
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 15, 2005
- 497 views
- Last edited Apr 16, 2005
Thanks Mic and Pete ! Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.ew Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan