#1
|
|||
|
|||
Kenbak Assembler Project
Since I have the Kenbak kit I decided it would help people if there was an assembler for it. It gets pretty annoying writing code by hand... I spent a while researching and found it would be a pretty big deal to write one from scratch. I found "AS" and have written a target code file for the KENBAK. It is still in beta, however so far it works perfectly. The only thing left to do is WARN people when they do something stupid. A good thing about "AS" is that it supports the 8080, 6800, and now the TTL Kenbak. So I think I will make "AS" the official complier for the kits.
I designed the mnemonic set for maximum flexibility and readability. As you can see my include file has the parameters in long hand. ; ) Its a goal of mine to get these into schools. I think this assembly language would be pretty easy for someone who has studied basic or C. What do you think? Here is sample output from the assembler building a program from the Kenbak Laboratory Exercises manual. Its the first one in the book. (I threw in NOOP and HALT at the end for fun) I converted the octal listing into opcodes, and then reassembled it. I get the same results. ; ) I've e-mailed the author about including the Kenbak code generator in the distribution and asked if he could add a command line option for using octal in the program listing instead of HEX. ; ) If he won't, I WILL! Let me know what you guys think... Anyone here have a Kenbak? If not, and you want one...I've got a few spots left. : ) http://www.kenbakkit.com Before I include the program listing, here are all of the possible instructions. This 132 IC TTL computer is purely amazing... Code:
[ADD/SUB/LOAD/STORE] [Addressing Mode], [Register], [Address] [OR/AND/LNEG] [Addressing Mode], [Register] [JPD/JPI/JMD/JMI] [Register], [Condition], [Address] SET [0/1], [Position], [Address] SKIP [0/1], [Position], [Address] BSHIFT [Direction], [Places], [Register] ROTATE [Direction], [Places], [Register] NOOP (no parameters) HALT (no parameters) Code:
macro assembler 1.42 Beta [Bld 55] (i386-unknown-win32) (C) 1992,2007 Alfred Arnold 68RS08-Generator (C) 2006 Andreas Bolsch Mitsubishi M16C-Generator also (C) 1999 RMS XILINX KCPSM(Picoblaze)-Generator (C) 2003 Andreas Wassatsch TMS320C2x-Generator (C) 1994/96 Thomas Sailer TMS320C5x-Generator (C) 1995/96 Thomas Sailer KENBAK-1 TTL Computer Assembler (C) 2007 Grant Stockly WARNING: KENBAK code generator still in beta AS V1.42 Beta [Bld 55] - source file ./a/ken.asm - page 1 - 8/29/2007 0:00:48 assembling ./a/ken.asm PASS 1 1/ 0 : page 0 2/ 0 : cpu KENBAK 3/ 0 : include kenbak.inc 22/ 0 : listing on 23/ 0 : 4/ 0 : 5/ 4 : ORG 004o ;First non-special address 6/ 4 : 7/ 4 : Loop: 8/ 4 : 03 01 ADD Constant, RegisterA, 1 9/ 6 : 1C 80 STORE Memory, RegisterA, Lamps 10/ 8 : E4 04 JPD Unconditional, Zero, Loop 11/ A : 12/ A : 00 HALT 13/ B : 80 NOOP AS V1.42 Beta [Bld 55] - source file ./a/ken.asm - page 2 - 8/29/2007 0:00:48 symbol table (* = unused): ------------------------ *ARCHITECTURE : i386-unknown-win32 - | *BIGENDIAN : 0 - | *BRANCHEXT : 0 - | *CASESENSITIVE : 0 - | CONSTANT : 3 - | *CONSTPI : 3.141592653589793 - | *DATE : 8/29/2007 - | *FALSE : 0 - | *FULLPMMU : 1 - | *HAS64 : 1 - | *HASDSP : 0 - | *HASFPU : 0 - | *HASPMMU : 0 - | *INDEXED : 6 - | *INDIND : 7 - | *INDIRECT : 5 - | *INEXTMODE : 0 - | *INLWORDMODE : 0 - | *INMAXMODE : 0 - | *INSRCMODE : 0 - | *INSUPMODE : 0 - | LAMPS : 80 - | *LISTON : 1 - | LOOP : 4 C | *MACEXP : 1 - | MEMORY : 4 - | *MOMCPU : EBA - | *MOMCPUNAME : KENBAK - | *NEGATIVE : 5 - | *NESTMAX : 100 - | *NON_ZERO : 3 - | *PACKING : 0 - | *PADDING : 1 - | *POSITIVE : 6 - | *POSITIVE_NON_ZERO : 7 - | REGISTERA : 0 - | *REGISTERB : 1 - | *REGISTERX : 2 - | *RELAXED : 0 - | *TIME : 0:00:48 - | *TRUE : 1 - | UNCONDITIONAL : 3 - | *VERSION : 142F - | ZERO : 4 - | 44 symbols 37 unused symbols AS V1.42 Beta [Bld 55] - source file ./a/ken.asm - page 3 - 8/29/2007 0:00:48 codepages: ---------- STANDARD (0 changed characters) 0.01 seconds assembly time 36 lines source file 1 pass 0 errors 0 warnings |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kenbak Kit Sales | Grant Stockly | Kenbak-1 | 3 | 09-25-2017 04:30 AM |
Looking for Kenbak 1 kit | Boris | Kenbak-1 | 2 | 10-20-2010 06:17 AM |
Original Kenbak on eBay | Geoff Harrison | Kenbak-1 | 4 | 04-29-2010 08:57 PM |
Kenbak-1 Music Project Idea | Grant Stockly | Kenbak-1 | 2 | 08-29-2007 04:28 AM |
Anyone Around??? What happened to the Kenbak kit? | Cappellanus | Kenbak-1 | 2 | 08-25-2007 01:16 AM |