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

Re: [midatlanticretro] TASM for 6800 assembly

Expand Messages
  • Dan Roganti
    oops, pressed Enter too soon....[files attached] POUNCE INX ;CLIMB ONTO ADDR LDAB 0,X ;GET LO-BYTE INX ;INC X TO POINT TO HI-BYTE LDAA 0,X
    Message 1 of 8 , Jun 22 9:05 PM
      oops, pressed Enter too soon....[files attached]

      POUNCE  INX             ;CLIMB ONTO ADDR
      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 HI-BYTE IN BIG-ENDIAN
      DEX ;DEC TO POINT TO LO-BYTE
      STAA 0,X ;PUT THE LO-BYTE IN BIG-ENDIAN
      ;
      LDX 0,X         ;GET INDEX ADDR IN BIG-ENDIAN
      JMP 0,X         ;AND GO

    • Dan Roganti
      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
      Message 2 of 8 , Jun 22 9:55 PM
        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
        .
        .
        .
        ;----------------------------------------------------------



      • B Degnan
        Dan Thank you very much. Now I understand. I thought TASM was the go-to assembler for any processor, I see at least for 6800 s it s simply easier to use
        Message 3 of 8 , Jun 23 6:28 AM

          Dan

          Thank you very much.  Now I understand.  I thought TASM was the go-to assembler for any processor, I see at least for 6800’s  it’s simply easier to use something more MIKBUG compatible, and now I understand why things are the way they are.  I only know the coding part, how to read the instructions themselves. 

           

          6800 itself is pretty easy to work with, a good language to learn assembly.  I am making a primitive monitor extension for SWTBUG to make it easier to load and run TSC BASIC on eProm by storing it in C100 and moving to 0100.  I also want to put in a simple memory dump array program.  This way, when I am using a teletype I only have to load and save BASIC programs themselves, not wait 25 minutes to load BASIC by tape before I can even start working on something. 

          Bill

           

          From: midatlanticretro@yahoogroups.com [mailto:midatlanticretro@yahoogroups.com] On Behalf Of Dan Roganti
          Sent: Sunday, June 23, 2013 12:55 AM
          To: midatlanticretro@yahoogroups.com
          Subject: Re: [midatlanticretro] TASM for 6800 assembly

           



          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

          .

          .

          .

          ;----------------------------------------------------------

           

           

           




        • joshbensadon
          Hi Bill, I ve used many different cross assemblers and it seems like every one does something different. One point you should beware of. Sometimes the
          Message 4 of 8 , Jun 23 10:29 AM
            Hi Bill,

            I've used many different cross assemblers and it seems like every one does something different. One point you should beware of. Sometimes the assembler tries to be "smart" by saving you a byte when you do a Long Call or Long Branch (3 bytes) when a relative call/branch (2 bytes) would work. Normally this is not a problem but if your code is timing sensitive (like in a bit bang), you'll want to watch the output like a hawk!

            :)J


            --- In midatlanticretro@yahoogroups.com, "B Degnan" <billdeg@...> wrote:
            >
            > Dan
            >
            > Thank you very much. Now I understand. I thought TASM was the go-to
            > assembler for any processor, I see at least for 6800's it's simply easier
            > to use something more MIKBUG compatible, and now I understand why things are
            > the way they are. I only know the coding part, how to read the instructions
            > themselves.
            >
            >
            >
            > 6800 itself is pretty easy to work with, a good language to learn assembly.
            > I am making a primitive monitor extension for SWTBUG to make it easier to
            > load and run TSC BASIC on eProm by storing it in C100 and moving to 0100. I
            > also want to put in a simple memory dump array program. This way, when I am
            > using a teletype I only have to load and save BASIC programs themselves, not
            > wait 25 minutes to load BASIC by tape before I can even start working on
            > something.
            >
            > Bill
            >
            >
            >
            > From: midatlanticretro@yahoogroups.com
            > [mailto:midatlanticretro@yahoogroups.com] On Behalf Of Dan Roganti
            > Sent: Sunday, June 23, 2013 12:55 AM
            > To: midatlanticretro@yahoogroups.com
            > Subject: Re: [midatlanticretro] TASM for 6800 assembly
            >
            >
            >
            >
            >
            > 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
            >
            > .
            >
            > .
            >
            > .
            >
            > ;----------------------------------------------------------
            >
          • Dan Roganti
            ... You should get the AS68 cross-assembler, I posted it online. Plus a nice Motorola book about 6800 programming. http://www.rogtronics.net/blog/?p=255 Dan On
            Message 5 of 8 , Jun 23 12:17 PM
              On Sun, Jun 23, 2013 at 9:28 AM, B Degnan <billdeg@...> wrote:


              Dan

              Thank you very much.  Now I understand.  I thought TASM was the go-to assembler for any processor, I see at least for 6800’s  it’s simply easier to use something more MIKBUG compatible, and now I understand why things are the way they are.  I only know the coding part, how to read the instructions themselves. 

               

              6800 itself is pretty easy to work with, a good language to learn assembly.  I am making a primitive monitor extension for SWTBUG to make it easier to load and run TSC BASIC on eProm by storing it in C100 and moving to 0100.  I also want to put in a simple memory dump array program.  This way, when I am using a teletype I only have to load and save BASIC programs themselves, not wait 25 minutes to load BASIC by tape before I can even start working on something. 



              You should get the AS68 cross-assembler, I posted it online. Plus a nice Motorola book about 6800 programming.

              Dan 

            • s100doctor
              ... I have also found that not all assemblers are equal. It s convenient to have an assembler in source form, so it can be modified to suit a particular bunch
              Message 6 of 8 , Jun 23 2:31 PM
                > On Sun, Jun 23, 2013 at 9:28 AM, B Degnan <billdeg@...> wrote:
                >
                > > Thank you very much. Now I understand. I thought TASM was the go-to
                > > assembler for any processor, I see at least for 6800's it's simply easier
                > > to use something more MIKBUG compatible, and now I understand why things
                > > are the way they are. I only know the coding part, how to read the
                > > instructions themselves.

                Dan Roganti <ragooman@...> wrote:
                > >
                > You should get the AS68 cross-assembler, I posted it online. Plus a nice
                > Motorola book about 6800 programming.
                > http://www.rogtronics.net/blog/?p=255
                >
                > Dan

                I have also found that not all assemblers are equal. It's convenient to have an assembler in source form, so it can be modified to suit a particular bunch of code that's written for some particular assembler not available now.

                Blah blah blah...

                http://www.retrotechnology.com/aux/swtp6800.html

                has a section "Web links to related 6800" where I point to my version of an AS68 assembler in C, which I compiled for MS-DOS. "I took some time in Nov 2011, to revive William Colley's 6800 cross assembler A68..."

                http://www.retrotechnology.com/restore/a68_0.zip

                I also tinkered with a general cross-assembler in C, with macro support, which covers several microprocessors, and which I've also compiled for MS-DOS, called ASMX:

                http://www.retrotechnology.com/memship/asmx.html

                OK? C compilers for old 16-bit MSDOS include Turbo C. 32-bit MS-DOS (for Win 2K's DOS box) is supported by lcc-win32. These are freely available.

                Herb Johnson
                retrotechnology.com
              Your message has been successfully submitted and would be delivered to recipients shortly.