Help save net neutrality! Learn more.
Close

#287 Problems with asx8051 when used stand-al

closed-remind
nobody
assembler (26)
2
2013-05-25
2002-01-31
Anonymous
No

I am currently using asx8051 stand-alone without SDCC
(yet). I had a number of problems as described here:-

1. Lines like

mov a,#'F'
mov a,#"F"

isn't accepted.

2. Lines like

.db "A", 0, "B", 0, "C", 0

are accepted by the assembler but generate rubbish
(the " character is stored!). Lines like

.db 'A', 0, 'B', 0, 'C', 0

cause an assembler error. In assemblers I have
written and used in the past, both would be accepted.

3. More seriously, undefined data labels are not
reported and generate duff code instead e.g.

mov dptr,#NOTDEFINED

is accepted with no warning and you get the equivalent
of

mov dptr,#0x0000

This appears to be because someone has commented out
the call to the error routine!

Discussion

  • Karl Bongers

    Karl Bongers - 2002-01-31

    Logged In: YES
    user_id=85617

    You mention that you've written assemblers
    before. And it sounds like you've tracked
    the problem into the source code.

    Could you invest some
    time in SDCC and help us improve it?
    Theres no active maintainer of the
    assembler code that I'm aware of.

    If you came up with some patches I'd be
    glad to help test, or work on getting the
    code changes checked in.

    Sincerely,

    Karl Bongers(karl@turbobit.com).

     
  • Johan Knol

    Johan Knol - 2002-02-08

    Logged In: YES
    user_id=63512

    1 from the asm manual: " 'D produces the value of the
    character D" so 'D not 'D'

    2 .db "A" should be .ascii "A"

    3 Undefined symbols are marked as such with appropriate
    tags in the relocatable (!) output and handed over to the
    linker.

     
  • Johan Knol

    Johan Knol - 2002-02-08
    • milestone: --> 100455
    • status: open --> closed-rejected
     
  • Nobody/Anonymous

    Logged In: NO

    I can't say I'm satisfied with the result. You obviously
    don't like people helping you out! So can I assume that my
    fixes won't get implemented?

    That aside, using .ascii is not much use defining a unicode
    string as used in a USB device (the target application is a
    Cypress EZUSB chip). With the current defective assembler,
    it is not possible to define the unicode string "FRED" in a
    readable manner. You have to use:-

    .db 'F
    .db 0
    .db 'R
    .db 0
    .db 'E
    .db 0
    .db 'D

    whereas I prefer (as permitted by the Intel assembler as
    far as I know)

    .db 'F', 0, 'R', 0, 'E', 0, 'D', 0

    etc. The as31 code from which asx8051 seems to have been
    derived seems to be more useable - but the syntax of the
    two assemblers is different.

    By the way, I have sent fixed files to John Hartman but he
    didn't seem too interested either.

    The point about the unknown symbol being passed to the
    linker is also bogus. In my case, where there is no
    relocateable code, the linker failed to report an error -
    it generated the duff hex file quite happily.

     
  • Johan Knol

    Johan Knol - 2002-02-08

    Logged In: YES
    user_id=63512

    I must have missed your fixes, please attach them to the
    bug report (you may need to setup a free sourceforge
    account). We really can use all the help.

    What's wrong with:
    .db 'F, 0, 'R, 0, 'E, 0, 'd, 0
    .asci "F\0R\0E\0D\0"

    If the linker doesn't complain about undefined symbols,
    that for sure is a bug. But I can not reproduce this,
    please give a code sample.

     
  • Johan Knol

    Johan Knol - 2002-02-08
    • milestone: 100455 --> unreproducable
    • priority: 5 --> 2
    • status: closed-rejected --> open-remind
     
  • Johan Knol

    Johan Knol - 2002-02-23
    • status: open-remind --> closed-remind
     

Log in to post a comment.