1. skychan1213

    Thread Starter New Member

    Jul 10, 2008
    9
    0
    To: everybodyhi, can somebody let me know what is going wrong with my HC11 file?ADCTL EQU $1030ADR2 EQU $1032 ORG $0400MYADC LDAB #$21 STAB ADCTL LDAB #$1ADELAY1 DECB BNE DELAY1 LDAA $1032 STAA $0000 SWI when i create the listing file with AS11 adc.asm -L > adc.lst ( adc is my asm file name ) but my s19 file is 0kB, what is going wrong? thank you !
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Most likely the reason there is no S19 is that there is an error in your code.

    It looks like you have two line labels ADELAY and DELAY1. I believe they should an a colon after them.

    hgmjr
     
    Last edited: Mar 16, 2009
  3. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    Moto asm didn't need a colon. Wierdos!
    Code ( (Unknown Language)):
    1.  
    2. ADCTL EQU $1030
    3. ADR2 EQU $1032
    4. ORG $0400MYADC <<-- Huh? I'd guess MYADC should be on the next line.
    5.  
    6.  LDAB #$21
    7.  STAB ADCTL
    8.  LDAB #$1
    9. ADELAY1
    10.  DECB
    11.  BNE   <<-- Hoo,boy! This will eat up the opcode for "LDAA"!! What does $1032 translate into as an opcode??
    12. DELAY1:
    13.  LDAA $1032
    14.  STAA $0000
    15.  SWI   <<-- And what is in the SWI vector?? If it's not initialized, you're bouncing off to La-La Land!
    16.  
    RULE #1 of coding: USE COMMENTS!!!

    --Rich
     
Loading...