1. RE: asm.e atten: Pete E. or Mic

>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 ".

new topic     » topic index » view message » categorize

2. RE: asm.e atten: Pete E. or Mic

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

new topic     » goto parent     » topic index » view message » categorize

3. RE: asm.e atten: Pete E. or Mic

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

new topic     » goto parent     » topic index » view message » categorize

4. RE: asm.e atten: Pete E. or Mic

>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.

new topic     » goto parent     » topic index » view message » categorize

5. RE: asm.e atten: Pete E. or Mic

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

new topic     » goto parent     » topic index » view message » categorize

6. RE: asm.e atten: Pete E. or Mic

>-- ======================================
>     #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.

new topic     » goto parent     » topic index » view message » categorize

7. RE: asm.e atten: Pete E. or Mic

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.

new topic     » goto parent     » topic index » view message » categorize

8. RE: asm.e atten: Pete E. or Mic

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu