Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/build/
/.cache/
*.lst
*.xex
dap.log
65816
31 changes: 31 additions & 0 deletions cli/minimal/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# **************************************************************************************
#
# Very minimal makefile.
#
# **************************************************************************************

#
# Path / Name of emulator.
#
EMULATOR = emu_linux_x64
#
# 64tass optios.
#
ASMOPTS = -b -w -x

#
# Assemble the source
#
assemble:
64tass test.asm $(ASMOPTS) -otest.xex -Ltest.lst
#
# Run program without break.
#
run: assemble
x65emu -q file=test.xex
Comment thread
paulscottrobson marked this conversation as resolved.
Outdated

#
# Run program and break on 65816 NOP ($EA)
#
runbrk: assemble
x65emu -q file=test.xex break=EA
Comment thread
paulscottrobson marked this conversation as resolved.
Outdated
38 changes: 38 additions & 0 deletions cli/minimal/test.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
; **************************************************************************************
;
; The worlds most simple test program.
;
; **************************************************************************************

.autsiz ; generate code based on last REP/SEP
;
; Start code at $200 (e.g. above zero page and stack)
;
ProgramStart = $200

* = ProgramStart-6
.word $FFFF ; first word of XEX file
.word ProgramStart ; first byte to copy
.word ProgramEnd-1 ; last byte to copy

;
; This is the main code block.
;
nop ; so we can test the breakpoint.
clc ; switch to 65816 mode
xce
rep #$30 ; 16 bit AXY
dec a ; A will be $FFFF hence 16 bit.
ldx #$ABCD

h1: jmp h1

ProgramEnd:

;
; The vector block follows, loaded into $FFE0 ... $FFFF
;
.word $FFE0
.word $FFFF
.word 0, 0, 0, 0, 0, 0, 0, 0
.word 0, 0, 0, 0, 0, 0, ProgramStart, 0
2 changes: 2 additions & 0 deletions src/test816.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ reset:
xba
; wai

nop

ora $12,s
lda ($23)
pea $1234
Expand Down