feretricks.blogg.se

6502 emulator c source code
6502 emulator c source code











6502 emulator c source code

This emits a byte value of 0x2C ( BIT absolute), which skips the next instruction. This pushes a 16 bit value from memory (absolute or zero page) onto the stack.Ī compact way to express out-of-bounds branches. This loads an immediate constant into A/Y. Most 16 bit constants are loaded into A/Y with this macro, but macros for A/X and X/Y also exist. Get the next character and make sure it’s Q, otherwise SYNTAX ERROR. The source defines many macros that make development easier. The following only adds the string to the binary if REALIO is equal to 4: Octal can also be forced with a ^O prefix.Ĭonditional translation is done using the IFE and IFN statements, which test whether the argument is zero. The RADIX statement switches between the two. In the floating point code, all numbers are octal. MACRO-10 did not support hex numbers, which is why most numbers are in decimal format. A set of macros developed by Paul Allen allowed MACRO-10 to understand and translate 6502 assembly, albeit in a modified format to fit the syntax of macros, for example: MOS 6502 Like the 8080 version, the 6502 version was developed on a PDP-10, using the MACRO-10 assembler. This is currently the oldest publicly available piece of source written by Bill Gates.

6502 emulator c source code code#

This is the original 1978 source code of Microsoft BASIC for 6502 with all original comments, documentation and easter eggs:













6502 emulator c source code