Code: Select all
; define what the CR word should emit to kernel_putc at the end of each line
TALI_OPTION_CR_EOL := [ "lf" ]
;TALI_OPTION_CR_EOL := [ "cr" ]
;TALI_OPTION_CR_EOL := [ "cr", "lf" ]Code: Select all
; define what the CR word should emit to kernel_putc at the end of each line
TALI_OPTION_CR_EOL := [ "lf" ]
;TALI_OPTION_CR_EOL := [ "cr" ]
;TALI_OPTION_CR_EOL := [ "cr", "lf" ]Code: Select all
\ Use DECIMAL or HEX to set the ASCII value display base
\ before running. Tali starts in DECIMAL mode.
: check-keys
CR ." Press Q to quit." CR
." ASCII VALUE CHAR" CR
." ----------- ----" CR
begin
key \ Get a character.
dup 5 u.r \ Print ASCII value in first column, right justified.
10 spaces \ Move to the second column.
dup emit \ Print the character.
cr \ Go to the next line.
'Q' = \ Check to see if it's the Q key.
until ;
\ Run it.
check-keysCode: Select all
: star emit 42 ; Data stack underflow
Return stack: 81 8D 93 D0 9A 80Code: Select all
: star emit 42 ; ok
star Data stack underflow
Return stack: 4F 86 0B 08 94 87 0C CE 91 80 \ My addresses will be slightly different than yours
: star 42 emit ; redefined star ok
star * ok
Code: Select all
DoPreCPUExecution( addr );
if( gDisassembleOn )
Logf("PC: %04X: %s", f6502.cpu.pc, dissassemble( &ram[ addr ], f6502.cpu.pc) );
// Execute a 6502 instruction..
fake6502_step(&f6502);Code: Select all
: check-keys
begin
key
'Q' =
until ;
Code: Select all
: check-keys compiled
begin compiled
key compiled
'Q' = compiled
until ; Data stack underflow
Return stack: D0 95 D6 87 E7 D0 9A 80Code: Select all
140063 PC: 95CE: jsr $d112:.underflow_1 ; xt_until
140064 PC: $d112 X: $78
140065 PC: D112: cpx #$77 ; underflow_1
140066 PC: D114: bpl $10 ; Branch to ($d126:.underflow_error)
140067 PC: D126: lda #$09 ; underflow_errorCode: Select all
11 PC: 8011: bne $f8 ; Branch to ($800b)Code: Select all
140065 PC: D112: cpx #$77 ; underflow_1
140066 PC: D114: bpl $10 ; Branch to ($d126:.underflow_error)Code: Select all
lda #$00
cmp #$81
bmi overhere ;branch won't be takenCode: Select all
In 2020, this fork was created:
<a href='https://github.com/omarandlorraine/fake6502'>https://github.com/omarandlorraine/fake6502</a>
See: <a href='./CHANGELOG.md'>CHANGELOG.md</a>
- - -
\section f6502_version Version
v2.4.0 - 19-07-2022