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

Chess Program Disassemble

Expand Messages
  • Richard
    Hello All, Attached is a Disassemble Of the chess program. This is a work in progress. my program adds the comments and symbols using a definition file. I am
    Message 1 of 9 , Sep 30, 2013
    • 1 Attachment
    • 80 KB
    Hello All,

    Attached is a Disassemble Of the chess program.

    This is a work in progress. my program adds the comments and symbols using a
    definition file.
    I am currently adding the comments in the pdfs, however there are no
    symbols.

    so if anyone wonts to help add to this with symbols.

    send them to me, like the following.

    0000 START
    0080 INPUT
    00A2 COMMAND

    Thanks RichardP
  • system3025
    Hi Richard, I’m working on a disassemble listings of Floyd’s chess program too. I’ve added all of Floyd’s comments and routine descriptions and I’m
    Message 2 of 9 , Oct 1, 2013
    • 0 Attachment

      Hi Richard,

       

      I’m working on a disassemble listings of Floyd’s chess program too. I’ve added all of Floyd’s comments and routine descriptions and I’m working on commenting the rest of the program. I have a lot of it finished. I'm trying to figure out how the program works. It's a lot of spaghetti code! He's patched it in several places and jumps back and forth all over the program. In the initialization just where the board is set up, it took me a while to figure out what he was doing.


      I've also found several bugs it the program. He's branching to the middle of an instruction at one point and the “FF” command for new game was branching to the wrong address and locking up the program. I fixed those and several other bugs. Also in Floyd’s description of the program he said that the memory from 0B90 to 09FF wasn’t being used. That’s not correct. There’s code at 0B8D to 0B94 that’s call from the “END OF BOARD” routine. The end of the "command" code is at 0B94.


      I have removed a lot of the junk data from the file and reassembled the program with the bug fixes that I've found so far. I'll upload the updated chess.hex and chess.bin files to "QuestDATA - The Lost Archives" directory. I’m not quite finished with the listings but when I’m done I’ll upload it too.

       

      Mike



      ---In cosmacelf@yahoogroups.com, <stateamuse@...> wrote:

      Hello All,

      Attached is a Disassemble Of the chess program.

      This is a work in progress. my program adds the comments and symbols using a
      definition file.
      I am currently adding the comments in the pdfs, however there are no
      symbols.

      so if anyone wonts to help add to this with symbols.

      send them to me, like the following.

      0000 START
      0080 INPUT
      00A2 COMMAND

      Thanks RichardP
    • Steve Gemeny
      Richard, & Mike I am curious to know which disassembler you use. I ask, hoping this is one of your own design, because the disassemblers I have seen (including
      Message 3 of 9 , Oct 1, 2013
      • 0 Attachment
        Richard, & Mike

        I am curious to know which disassembler you use.

        I ask, hoping this is one of your own design, because the disassemblers I
        have seen (including the one I use) all seem inadequate. I've been using
        one I found online many years ago for the 1806 written by Herman Robers,
        PA3FYW -pa3fyw@... - who has never answered emails.

        I say they are all inadequate because it seems to me a disassembler should
        have 2 objectives; one - to produce output intended to be human readable
        including addresses (.DIS), and two - to produce output intended to be the
        input to an assembler(.ASM). The Human readable result, I would think,
        should be fixed delimited in some way (like using tabs). Space delimited
        text files have issues when viewed with fonts that are proportionally spaced
        in that the text no longer is aligned. But this human readable format is not
        ingestible into an assembler since it must first have all those addresses
        stripped away. The machine readable output should simply be the assembly
        language that can be directly ingested by an assembler such that object code
        is again produced, but this tends not to be human readable because it is
        missing the addresses which limits the addition of labels and comments
        necessary to generate a good assembly listing.

        In an ideal world this might be most easily accomplished if there existed a
        liaison program that ingested the textual output of the disassembler file,
        .DIS - complete with addresses that would be stripped out leaving only the
        code but include any edited in comments and labels, the resulting output
        file, .ASM could then be re-ingested in to an assembler. Another option
        might be a matched disassembler/assembler pair. With this approach the
        disassembler output is directly ingested into the assembler and it is the
        assembler's .LST that is used as human readable code (addresses included)
        for editing the assembly file. This approach seems more tedious to me as it
        requires the human to be looking at two files, .ASM and .LST.

        Maybe this functionality is already implemented and I am simply unaware...

        The approach I have been using in the past is tedious to say the least (I
        don't do peal scripts and the like). I usually open the disassembled text
        file in Excel, configuring Excel to parse each line into columns to align
        and separate the fields, then concatenate only the labels, mnemonics,
        arguments, along with any fresh comments back together as required to make a
        column of text that can be pasted into a text document. Along the way I
        usually end up fixing formatting and syntactical things that are assembler
        specific before I actually get bin files that I can compare (I use the
        PseudoSam 18 Assembler, 1986 shareware and HexEdit for viewing/comparing bin
        files).

        So, if any of this informs any thinking, I'd ask the following, as it might
        help with causing some of these great programs to become widely available:

        Are you, or is anyone else in a position to release to the group a tool or
        set of tools that can behave in this way, (or to point me to one that
        already exists)?

        If it is to be developed, I'd ask that the assembly output support more than
        just a single format of assembler by being selectable among the several
        accepted formats (PseudoSam among them).

        Just scratching my head here...

        Steve






        -----Original Message-----
        From: cosmacelf@yahoogroups.com [mailto:cosmacelf@yahoogroups.com] On Behalf
        Of Richard
        Sent: Monday, September 30, 2013 11:14 PM
        To: cosmacelf@yahoogroups.com
        Subject: [cosmacelf] Chess Program Disassemble [1 Attachment]

        Hello All,

        Attached is a Disassemble Of the chess program.

        This is a work in progress. my program adds the comments and symbols using a
        definition file.
        I am currently adding the comments in the pdfs, however there are no
        symbols.

        so if anyone wonts to help add to this with symbols.

        send them to me, like the following.

        0000 START
        0080 INPUT
        00A2 COMMAND

        Thanks RichardP



        ------------------------------------

        ========================================================
        Questions? Check the FAQ at http://www.cosmacelf.com/forumfaq.html
        Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups Links
      • Richard
        Hi Steve, I am using a disassembler, that i designed some twenty years ago, back when i was disassembling tinybasic. it is writen in qbasic. I haven t released
        Message 4 of 9 , Oct 1, 2013
        • 0 Attachment
          Hi Steve,

          I am using a disassembler, that i designed some twenty years ago,
          back when i was disassembling tinybasic. it is writen in qbasic. I haven't
          released it because i do alot of tweeking for different
          programs.

          I have however released and posted the assembler and tools that can strip
          the .ASM out of the .LST or .DIS
          My DIS format is the same as my LST format. the assembler is in Tools Folder
          Qelfasm.zip

          If you would like a copy of the disassembler I can send it to you.
          It a little out of the ordinary, Requires ASCII Hex input, but i have
          converters to help with this, def file only contain symbol and comments.

          ----- Original Message -----
          From: "Steve Gemeny" <steve@...>
          To: <cosmacelf@yahoogroups.com>
          Sent: Tuesday, October 01, 2013 4:26 PM
          Subject: RE: [cosmacelf] Chess Program Disassemble


          > Richard, & Mike
          >
          > I am curious to know which disassembler you use.
          >
          > I ask, hoping this is one of your own design, because the disassemblers I
          > have seen (including the one I use) all seem inadequate. I've been using
          > one I found online many years ago for the 1806 written by Herman Robers,
          > PA3FYW -pa3fyw@... - who has never answered emails.
          >
          > I say they are all inadequate because it seems to me a disassembler should
          > have 2 objectives; one - to produce output intended to be human readable
          > including addresses (.DIS), and two - to produce output intended to be
          the
          > input to an assembler(.ASM). The Human readable result, I would think,
          > should be fixed delimited in some way (like using tabs). Space delimited
          > text files have issues when viewed with fonts that are proportionally
          spaced
          > in that the text no longer is aligned. But this human readable format is
          not
          > ingestible into an assembler since it must first have all those addresses
          > stripped away. The machine readable output should simply be the assembly
          > language that can be directly ingested by an assembler such that object
          code
          > is again produced, but this tends not to be human readable because it is
          > missing the addresses which limits the addition of labels and comments
          > necessary to generate a good assembly listing.
          >
          > In an ideal world this might be most easily accomplished if there existed
          a
          > liaison program that ingested the textual output of the disassembler file,
          > .DIS - complete with addresses that would be stripped out leaving only the
          > code but include any edited in comments and labels, the resulting output
          > file, .ASM could then be re-ingested in to an assembler. Another option
          > might be a matched disassembler/assembler pair. With this approach the
          > disassembler output is directly ingested into the assembler and it is the
          > assembler's .LST that is used as human readable code (addresses included)
          > for editing the assembly file. This approach seems more tedious to me as
          it
          > requires the human to be looking at two files, .ASM and .LST.
          >
          > Maybe this functionality is already implemented and I am simply unaware...
          >
          > The approach I have been using in the past is tedious to say the least (I
          > don't do peal scripts and the like). I usually open the disassembled text
          > file in Excel, configuring Excel to parse each line into columns to align
          > and separate the fields, then concatenate only the labels, mnemonics,
          > arguments, along with any fresh comments back together as required to make
          a
          > column of text that can be pasted into a text document. Along the way I
          > usually end up fixing formatting and syntactical things that are assembler
          > specific before I actually get bin files that I can compare (I use the
          > PseudoSam 18 Assembler, 1986 shareware and HexEdit for viewing/comparing
          bin
          > files).
          >
          > So, if any of this informs any thinking, I'd ask the following, as it
          might
          > help with causing some of these great programs to become widely available:
          >
          > Are you, or is anyone else in a position to release to the group a tool or
          > set of tools that can behave in this way, (or to point me to one that
          > already exists)?
          >
          > If it is to be developed, I'd ask that the assembly output support more
          than
          > just a single format of assembler by being selectable among the several
          > accepted formats (PseudoSam among them).
          >
          > Just scratching my head here...
          >
          > Steve
          >
          >
          >
          >
          >
          >
          > -----Original Message-----
          > From: cosmacelf@yahoogroups.com [mailto:cosmacelf@yahoogroups.com] On
          Behalf
          > Of Richard
          > Sent: Monday, September 30, 2013 11:14 PM
          > To: cosmacelf@yahoogroups.com
          > Subject: [cosmacelf] Chess Program Disassemble [1 Attachment]
          >
          > Hello All,
          >
          > Attached is a Disassemble Of the chess program.
          >
          > This is a work in progress. my program adds the comments and symbols using
          a
          > definition file.
          > I am currently adding the comments in the pdfs, however there are no
          > symbols.
          >
          > so if anyone wonts to help add to this with symbols.
          >
          > send them to me, like the following.
          >
          > 0000 START
          > 0080 INPUT
          > 00A2 COMMAND
          >
          > Thanks RichardP
          >
          >
          >
          > ------------------------------------
          >
          > ========================================================
          > Questions? Check the FAQ at http://www.cosmacelf.com/forumfaq.html
          > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
          Links
          >
          >
          >
          >
          >
          >
          >
          >
          > ------------------------------------
          >
          > ========================================================
          > Questions? Check the FAQ at http://www.cosmacelf.com/forumfaq.html
          > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
          Links
          >
          >
          >
        • Richard
          I still don t see where 0B8D is called but I have made adjustments I did find that, converting the pdf file to 300dpi pictures, (free online) helped the text
          Message 5 of 9 , Oct 1, 2013
          • 0 Attachment
            
            I still don't see where 0B8D is called but I have made adjustments
             
            I did find that, converting the pdf file to 300dpi pictures, (free online) helped the text conversion process.
             
            thanks
            ----- Original Message -----
            Sent: Tuesday, October 01, 2013 10:54 AM
            Subject: [cosmacelf] RE: Chess Program Disassemble

            Hi Richard,

             

            I’m working on a disassemble listings of Floyd’s chess program too. I’ve added all of Floyd’s comments and routine descriptions and I’m working on commenting the rest of the program. I have a lot of it finished. I'm trying to figure out how the program works. It's a lot of spaghetti code! He's patched it in several places and jumps back and forth all over the program. In the initialization just where the board is set up, it took me a while to figure out what he was doing.


            I've also found several bugs it the program. He's branching to the middle of an instruction at one point and the “FF” command for new game was branching to the wrong address and locking up the program. I fixed those and several other bugs. Also in Floyd’s description of the program he said that the memory from 0B90 to 09FF wasn’t being used. That’s not correct. There’s code at 0B8D to 0B94 that’s call from the “END OF BOARD” routine. The end of the "command" code is at 0B94.


            I have removed a lot of the junk data from the file and reassembled the program with the bug fixes that I've found so far. I'll upload the updated chess.hex and chess.bin files to "QuestDATA - The Lost Archives" directory. I’m not quite finished with the listings but when I’m done I’ll upload it too.

             

            Mike



            ---In cosmacelf@yahoogroups.com, <stateamuse@...> wrote:

            Hello All,

            Attached is a Disassemble Of the chess program.

            This is a work in progress. my program adds the comments and symbols using a
            definition file.
            I am currently adding the comments in the pdfs, however there are no
            symbols.

            so if anyone wonts to help add to this with symbols.

            send them to me, like the following.

            0000 START
            0080 INPUT
            00A2 COMMAND

            Thanks RichardP
          • Charles Richmond
            ... It would be interesting and instructive to compare the source listing of this 1802 chess program with the 6502 listing Peter R. Jennings Microchess
            Message 6 of 9 , Oct 1, 2013
            • 0 Attachment
              On Sep 30, 2013, at 10:14 PM, Richard wrote:

              > Hello All,
              >
              > Attached is a Disassemble Of the chess program.
              >
              > This is a work in progress. my program adds the comments and
              > symbols using a
              > definition file.
              > I am currently adding the comments in the pdfs, however there are no
              > symbols.
              >
              > so if anyone wonts to help add to this with symbols.
              >
              > send them to me, like the following.
              >
              > 0000 START
              > 0080 INPUT
              > 00A2 COMMAND
              >
              > Thanks RichardP

              It would be interesting and instructive to compare the source listing
              of this 1802 chess program with the 6502 listing Peter R. Jennings
              Microchess program.

              --
              +----------------------------------------+
              |.....Charles and Francis Richmond.......|
              |........................................|
              |..plano dot net at aquaporin4 dot com...|
              +----------------------------------------+
            • system3025
              It s called at 01BD in the END OF BOARD routine with this code: ldi $8D plo r0 ; r0 = 0B8D sep r0 ; Return from building test array r0 is a subroutine
              Message 7 of 9 , Oct 1, 2013
              • 0 Attachment

                It's called at 01BD in the "END OF BOARD" routine with this code:


                ldi $8D

                plo r0 ; r0 = 0B8D

                sep r0 ; Return from building test array


                r0 is a subroutine pointer and is always pointing to the 0B page. It was just another patch to the code. I didn't see it at first either. When I removed the junk data that Floyd said wasn't being used the program stop at an idl instruction.


                Mike



                ---In cosmacelf@yahoogroups.com, <cosmacelf@yahoogroups.com> wrote:

                
                I still don't see where 0B8D is called but I have made adjustments
                 
                I did find that, converting the pdf file to 300dpi pictures, (free online) helped the text conversion process.
                 
                thanks
                ----- Original Message -----
                Sent: Tuesday, October 01, 2013 10:54 AM
                Subject: [cosmacelf] RE: Chess Program Disassemble

                Hi Richard,

                 

                I’m working on a disassemble listings of Floyd’s chess program too. I’ve added all of Floyd’s comments and routine descriptions and I’m working on commenting the rest of the program. I have a lot of it finished. I'm trying to figure out how the program works. It's a lot of spaghetti code! He's patched it in several places and jumps back and forth all over the program. In the initialization just where the board is set up, it took me a while to figure out what he was doing.


                I've also found several bugs it the program. He's branching to the middle of an instruction at one point and the “FF” command for new game was branching to the wrong address and locking up the program. I fixed those and several other bugs. Also in Floyd’s description of the program he said that the memory from 0B90 to 09FF wasn’t being used. That’s not correct. There’s code at 0B8D to 0B94 that’s call from the “END OF BOARD” routine. The end of the "command" code is at 0B94.


                I have removed a lot of the junk data from the file and reassembled the program with the bug fixes that I've found so far. I'll upload the updated chess.hex and chess.bin files to "QuestDATA - The Lost Archives" directory. I’m not quite finished with the listings but when I’m done I’ll upload it too.

                 

                Mike



                ---In cosmacelf@yahoogroups.com, <stateamuse@...> wrote:

                Hello All,

                Attached is a Disassemble Of the chess program.

                This is a work in progress. my program adds the comments and symbols using a
                definition file.
                I am currently adding the comments in the pdfs, however there are no
                symbols.

                so if anyone wonts to help add to this with symbols.

                send them to me, like the following.

                0000 START
                0080 INPUT
                00A2 COMMAND

                Thanks RichardP
              • system3025
                I m using DASMx http://myweb.tiscali.co.uk/pclare/DASMx/ . It works OK. I don t like the labels being on the line before the instructions though. I use
                Message 8 of 9 , Oct 1, 2013
                • 0 Attachment

                  I'm using DASMx http://myweb.tiscali.co.uk/pclare/DASMx/ . It works OK. I don't like the labels being on the line before the instructions though. I use notepad++ macro's to edit the .asm file the way I want. 


                  I've been thinking about writing a dis/assembler for my sim. I don't know I might sometime. 


                  Mike



                  ---In cosmacelf@yahoogroups.com, <cosmacelf@yahoogroups.com> wrote:

                  Richard, & Mike

                  I am curious to know which disassembler you use.

                  I ask, hoping this is one of your own design, because the disassemblers I
                  have seen (including the one I use) all seem inadequate. I've been using
                  one I found online many years ago for the 1806 written by Herman Robers,
                  PA3FYW -pa3fyw@... - who has never answered emails.

                  I say they are all inadequate because it seems to me a disassembler should
                  have 2 objectives; one - to produce output intended to be human readable
                  including addresses (.DIS), and two - to produce output intended to be the
                  input to an assembler(.ASM). The Human readable result, I would think,
                  should be fixed delimited in some way (like using tabs). Space delimited
                  text files have issues when viewed with fonts that are proportionally spaced
                  in that the text no longer is aligned. But this human readable format is not
                  ingestible into an assembler since it must first have all those addresses
                  stripped away. The machine readable output should simply be the assembly
                  language that can be directly ingested by an assembler such that object code
                  is again produced, but this tends not to be human readable because it is
                  missing the addresses which limits the addition of labels and comments
                  necessary to generate a good assembly listing.

                  In an ideal world this might be most easily accomplished if there existed a
                  liaison program that ingested the textual output of the disassembler file,
                  .DIS - complete with addresses that would be stripped out leaving only the
                  code but include any edited in comments and labels, the resulting output
                  file, .ASM could then be re-ingested in to an assembler. Another option
                  might be a matched disassembler/assembler pair. With this approach the
                  disassembler output is directly ingested into the assembler and it is the
                  assembler's .LST that is used as human readable code (addresses included)
                  for editing the assembly file. This approach seems more tedious to me as it
                  requires the human to be looking at two files, .ASM and .LST.

                  Maybe this functionality is already implemented and I am simply unaware...

                  The approach I have been using in the past is tedious to say the least (I
                  don't do peal scripts and the like). I usually open the disassembled text
                  file in Excel, configuring Excel to parse each line into columns to align
                  and separate the fields, then concatenate only the labels, mnemonics,
                  arguments, along with any fresh comments back together as required to make a
                  column of text that can be pasted into a text document. Along the way I
                  usually end up fixing formatting and syntactical things that are assembler
                  specific before I actually get bin files that I can compare (I use the
                  PseudoSam 18 Assembler, 1986 shareware and HexEdit for viewing/comparing bin
                  files).

                  So, if any of this informs any thinking, I'd ask the following, as it might
                  help with causing some of these great programs to become widely available:

                  Are you, or is anyone else in a position to release to the group a tool or
                  set of tools that can behave in this way, (or to point me to one that
                  already exists)?

                  If it is to be developed, I'd ask that the assembly output support more than
                  just a single format of assembler by being selectable among the several
                  accepted formats (PseudoSam among them).

                  Just scratching my head here...

                  Steve






                  -----Original Message-----
                  From: cosmacelf@yahoogroups.com [mailto:cosmacelf@yahoogroups.com] On Behalf
                  Of Richard
                  Sent: Monday, September 30, 2013 11:14 PM
                  To: cosmacelf@yahoogroups.com
                  Subject: [cosmacelf] Chess Program Disassemble [1 Attachment]

                  Hello All,

                  Attached is a Disassemble Of the chess program.

                  This is a work in progress. my program adds the comments and symbols using a
                  definition file.
                  I am currently adding the comments in the pdfs, however there are no
                  symbols.

                  so if anyone wonts to help add to this with symbols.

                  send them to me, like the following.

                  0000 START
                  0080 INPUT
                  00A2 COMMAND

                  Thanks RichardP



                  ------------------------------------

                  ========================================================
                  Questions? Check the FAQ at http://www.cosmacelf.com/forumfaq.html
                  Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups Links
                • Richard
                  I Shouldn t have missed that I was Spacifically Looking For The SEP Thanks ... From: system3025 To: cosmacelf@yahoogroups.com Sent: Tuesday, October 01, 2013
                  Message 9 of 9 , Oct 1, 2013
                  • 0 Attachment
                    
                    I Shouldn't have missed that I was Spacifically Looking For The SEP
                     
                    Thanks
                     
                    ----- Original Message -----
                    Sent: Tuesday, October 01, 2013 11:38 PM
                    Subject: RE: Re: [cosmacelf] RE: Chess Program Disassemble

                    It's called at 01BD in the "END OF BOARD" routine with this code:


                    ldi $8D

                    plo r0 ; r0 = 0B8D

                    sep r0 ; Return from building test array


                    r0 is a subroutine pointer and is always pointing to the 0B page. It was just another patch to the code. I didn't see it at first either. When I removed the junk data that Floyd said wasn't being used the program stop at an idl instruction.


                    Mike



                    ---In cosmacelf@yahoogroups.com, <cosmacelf@yahoogroups.com> wrote:

                    
                    I still don't see where 0B8D is called but I have made adjustments
                     
                    I did find that, converting the pdf file to 300dpi pictures, (free online) helped the text conversion process.
                     
                    thanks
                    ----- Original Message -----
                    Sent: Tuesday, October 01, 2013 10:54 AM
                    Subject: [cosmacelf] RE: Chess Program Disassemble

                    Hi Richard,

                     

                    I’m working on a disassemble listings of Floyd’s chess program too. I’ve added all of Floyd’s comments and routine descriptions and I’m working on commenting the rest of the program. I have a lot of it finished. I'm trying to figure out how the program works. It's a lot of spaghetti code! He's patched it in several places and jumps back and forth all over the program. In the initialization just where the board is set up, it took me a while to figure out what he was doing.


                    I've also found several bugs it the program. He's branching to the middle of an instruction at one point and the “FF” command for new game was branching to the wrong address and locking up the program. I fixed those and several other bugs. Also in Floyd’s description of the program he said that the memory from 0B90 to 09FF wasn’t being used. That’s not correct. There’s code at 0B8D to 0B94 that’s call from the “END OF BOARD” routine. The end of the "command" code is at 0B94.


                    I have removed a lot of the junk data from the file and reassembled the program with the bug fixes that I've found so far. I'll upload the updated chess.hex and chess.bin files to "QuestDATA - The Lost Archives" directory. I’m not quite finished with the listings but when I’m done I’ll upload it too.

                     

                    Mike



                    ---In cosmacelf@yahoogroups.com, <stateamuse@...> wrote:

                    Hello All,

                    Attached is a Disassemble Of the chess program.

                    This is a work in progress. my program adds the comments and symbols using a
                    definition file.
                    I am currently adding the comments in the pdfs, however there are no
                    symbols.

                    so if anyone wonts to help add to this with symbols.

                    send them to me, like the following.

                    0000 START
                    0080 INPUT
                    00A2 COMMAND

                    Thanks RichardP
                  Your message has been successfully submitted and would be delivered to recipients shortly.