Loading ...
Sorry, an error occurred while loading the content.

31389Re: [midatlanticretro] TASM for 6800 assembly

Expand Messages
  • Dan Roganti
    Jun 22, 2013
    • 0 Attachment
      it's getting late....
      the patch should go in the beginning

      ----------------------------------------------------------
      ;CONVERT TABLE TO BIG-ENDIAN
      ;ONLY DONE ONCE IN PROGRAM
      ;
      LDX #TABLE     ;GET POINTER TO TABLE
      INX ;INC X TO POINT TO LO-BYTE
      CONVRT LDAB 0,X       ;GET LO-BYTE
      INX ;INC X TO POINT TO HI-BYTE
      LDAA 0,X ;GET HI-BYTE
      STAB 0,X ;PUT THE LO-BYTE IN BIG-ENDIAN
      DEX ;DEC TO POINT TO LO-BYTE
      STAA 0,X ;PUT THE HI-BYTE IN BIG-ENDIAN
      ;
      CPX #TABLAST    ;LAST ENTRY ?
      BEQ U2708       ;YES, EXIT LOOP
      INX             ;POINT TO NEXT ENTRY
      INX
      INX
      BRA CONVRT      ;LOOP FOR NEXT ENTRY
      ;----------------------------------------------------------
      ; START
      U2708 LDS #$A042 ;GET STACKED
      .
      .
      .
      This line gets a new label
      TABLAST .WORD TABEND  ; NEW LABEL FOR LAST ENTRY OF TABLE
      .
      .
      .
      ;----------------------------------------------------------



    • Show all 8 messages in this topic