Path: news.uiowa.edu!uunet!usc!howland.reston.ans.net!gatech!prism!gt2011a From: gt2011a@prism.gatech.EDU (gt2011a Sheldon Simms) Newsgroups: comp.binaries.apple2 Subject: 65c02 emulator/assembler (0/3) cover letter Message-ID: <104527@hydra.gatech.EDU> Date: 12 Jul 93 05:39:00 GMT Organization: Georgia Institute of Technology Lines: 52 This is something I've been messing around with for the past few weeks posted here for your interest and enjoyment. Or boredom if that's the case. It's a 65c02 emulator and assembler. There may indeed be bugs, especially in the 65c02 emulator part, since I have not tested it exhaustively, but all this has reached the stage where I thought that someone else might find it interesting. If you are interested in playing around with this stuff, you should definately keep this file, since there is absolutely no documentation besides this. I wrote this stuff on my Mac using Think C 6.0. It's just plain ANSI C. I have compiled it on my school computer using gcc. (actually g++) with hardly any problems, so it shouldn't be too hard to get running on a UNIX computer with and ANSI compiler. the only warnings or errors I get are "#pragma once is obsolete". I don't have an Apple IIgs, but it might be kind of neat to see if it could be compiled under Orca and see if it works. Anyway, The assembler is an absolute assembler that takes all 65c02 opcodes and addressing modes. It does not have macros and it doesn't understand expressions. It knows a few pseudo-ops: ORG, EQU, DFB, DS, STR, and ASC. The meanings are: ORG xxxx - set PC to xxxx lab EQU xxxx - equate a label to the value xxxx. DFB xx,xx,... - define a comma delimited list of byte values in memory. DS xxxx - define xxx bytes of storage (filled with zero) STR "string" - define a length-byte string in memory ASC "string" - define a null terminated string in memory. Any instruction or pseudo-op can be labeled. Also the assembler basically uses MOS syntax. (i.e. #
ADDRESS for low and high bytes, respectively.) The 65c02 emulator includes a 65c02 instruction execution unit and a simple monitor that allows you to see and edit memory, step and trace, see registers, change banks of memory, load object files produced by the above assembler, and begin execution at an arbitrary address. If you get the emulator up and running, type '?' to get a list of commands. Well, that's about it. If anyone gets this stuff up, send me some mail since I plan on testing the 65c02 emulator to make sure that it is correct, and improving it. It's not as fast as it could be, so if anyone has any suggestions, I'm glad to get them. -Sheldon Simms gt2011a@prism.gatech.edu -- W. Sheldon Simms | Clarence / Newt / Rush <- good guys gt2011a@prism.gatech.edu | Clinton / Lewis <- bad guys ------------------------------------------------------------------ AB A8 CD 87 89 B4 BC. BE A1 81 E5, C4 B1 97.