Cross-assembler with paper tape format output

Discuss software for the Micro-KIM and KIM-1

Cross-assembler with paper tape format output

Postby AartBik » Nov Fri 04, 2011 1:20 am

I just ordered the Micro-KIM and can't wait for it to arrive! I learned programming 6510 machine code on the Commodore 64, and still enjoy doing some vintage programming every now and then.

In anticipation of the Micro-KIM's arrival, I extended my 65xx cross-assembler (available for Windows, Linux and MacOS) with the paper tape format, so that its output can feed directly into the Kim's terminal interface. I simply generated the format based on old documentation and it is still untested. If someone is interested in trying it out, I would appreciate early feedback. Otherwise, I will report back when I get my Micro-KIM.

For example, for an assembler test file kim.s:

Code: Select all
.byte 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


The assembler generates paper tape format in text representation using the option -P:

Code: Select all
C:\win2c64>win2c64 -P kim.s
**** MOS Technology 6510 Assembler
**** for the Commodore 64   (v2.0)
**** (C) 2005-2011   Aart J.C. Bik

segment 0 [$c000:$c018) #bytes : 24
output paper tape format (text)


Which looks as follows:

Code: Select all
;18C0000102030405060708090A0B0C0D0E0F1011121314151617180204
;0000010001
User avatar
AartBik
 
Posts: 24
Joined: Nov Thu 03, 2011 11:20 pm
Location: Mountain View, CA, USA

Re: Cross-assembler with paper tape format output

Postby AartBik » Nov Mon 07, 2011 3:39 pm

I have also implemented a disassembler that can directly read from paper tape format.

For example, the following test assembly program

Code: Select all
      .org $0200
      ldx #100
loop  dex
      bne loop
      brk


is, using option -P, assembled into paper tape format:

Code: Select all
;060200A264CAD0FD0003A5
;0000010001


Using the disassembler, this maps back to:

Code: Select all
$0200 a2 64  ldx #$64
$0202 ca     dex
$0203 d0 fd  bne $0202
$0205 00     brk
User avatar
AartBik
 
Posts: 24
Joined: Nov Thu 03, 2011 11:20 pm
Location: Mountain View, CA, USA

Re: Cross-assembler with paper tape format output

Postby uridium » Mar Fri 23, 2012 10:38 pm

G'day Aart,

This looks like it'd be ideal for what I'm trying to do. I've been mostly hacking together a limited functionality assembler as I go in VAX BASIC that'll emit paper-tape format. What was this written in? Is the source available/portable?

Regards,
Al
--
Al Boyanich
adb -w -P "world> " -k /dev/meta/galaxy/ksyms /dev/god/brain
User avatar
uridium
 
Posts: 12
Joined: Jul Sun 31, 2011 11:21 pm
Location: Sydney N.S.W, Australia

Re: Cross-assembler with paper tape format output

Postby AartBik » Mar Sat 24, 2012 12:22 am

uridium wrote:This looks like it'd be ideal for what I'm trying to do.


Hi Al,

Thanks for your reply. The cross-assembler is written in rather portable C/C++ and I provide binaries for Windows (win2c64), for Linux (lin2c64), and for MacOS (mac2c64). It's one of those hobby projects I prefer to keep closed-source, but I distribute the binaries under a very liberal license and can look into providing binaries for other platforms if you like.

The binaries provide an assembler with the following output formats (and, equally can be used as disassembler on any of these formats):

  • -c : C64S tape image (the default, since I originally wrote it for C64 development)
  • -p : use paper tape format (binary)
  • -P : use paper tape format (text; directly uploadable to micro-Kim!)
  • -r : use raw bytes format (with header)
  • -R : use raw bytes format (without header)
  • -6 : use H6X format (text; directly uploadable to Charles Bond's Soft6502 simulator)
Downloads and documentation at:
http://www.aartbik.com/MISC/c64.html
http://www.aartbik.com/MISC/win2c64.pdf
User avatar
AartBik
 
Posts: 24
Joined: Nov Thu 03, 2011 11:20 pm
Location: Mountain View, CA, USA

Re: Cross-assembler with paper tape format output

Postby uridium » Mar Sat 24, 2012 6:18 am

Hi Aart,

I understand so no problem. I should do some more work on the self-made stuff I'm currently using. Sadly, I'm not able to run those binaries. Closest is an old PowerMac which isn't set up for serial IO. I've been thinking of re-writing my existing BASIC code over to C. I shouldn't have started it in VAX-Basic (despite that it can be compiled to native executable) in the first place but nostalgia gripped me.

Best Wishes,
Al.
--
Al Boyanich
adb -w -P "world> " -k /dev/meta/galaxy/ksyms /dev/god/brain
User avatar
uridium
 
Posts: 12
Joined: Jul Sun 31, 2011 11:21 pm
Location: Sydney N.S.W, Australia


Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron