|
The MC6800 ("sixty-eight hundred") is an 8-bit microprocessor designed and first manufactured by Motorola in 1974. The MC6800 microprocessor was part of the M6800 Microcomputer System that also included serial and parallel interface ICs, RAM, ROM and other support chips.
./lionheart <input_file> [output_file]- Excellent error handling, easy-to-extend parsing with cpp-peglib
ORGmnemonic to set program counter addressFDBmnemonic to set interrupt and reset vectors
Note: hexed.it is a great online hex editor to disassemble bytecode!
; Variables
DATA = $F0
; Start of ROM
ORG $F000
RESET:
; Setup stack register (required)
LDS #$00FF
; Clear accumulators (optional)
CLR A
CLR B
; Clear the index register (optional)
LDX #$0000
; Enable interrupts
CLI
MAIN:
LDA A #$01
BRA OUT
SAME:
LDA B DATA
ADD B #$10
STA B DATA
ASL A
OUT:
LDX #$2F00
WAIT:
DEX
BNE WAIT
TAB
TST B
BNE SAME
LDA A #$01
LDX $F0
CPX #$C10F
BNE OUT
BRA MAIN
; Reset vector
ORG $FFFE ; The exact end of memory
FDB RESET
TST ; <-- bad
cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER="Address;Undefined" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIWYU=ON
cmake --build buildcmake -Bbuild -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build buildOr with ninja:
cmake -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build buildRun the test suite:
./build/test_suiteThis project is dual-licensed under the Apache License, Version 2.0 and the GNU General Public License, Version 3.0 (or later).
You are free to choose the license that best fits your specific use case. For the full text of each license, please see LICENSE.Apache-v2 and LICENSE-GPL-v3.

