I'm surprised to hear you have trouble compiling run6502 - it's always been OK for me. Let me know if there's anything I can do.
Well, I've made a little more progress. I can now run Bill's tinybasic on run6502:
Code:
$ perl -p -e '$|++;$_=~s/\n/\r/' | ./run6502 -l 0 tinybasic.1400.65b -G 1406 -P 1409 -R 1400
PRINT 22000/7
?:?
?3142
Those ? characters are features - control codes sent by tinybasic.
The cryptic perl is needed because linux sends \n for newlines but tinybasic likes to see \r carriage returns. There might be a better way to sort that out.
The options to run6502 set up the read and write hooks and the reset vector.
I did make a couple of changes to Bill's code. I had to adjust it place the user area after tinybasic, and to defang the memory test which would run forever:
Code:
COLD_S lda #$00 ; Load accumulator with $00
sta $20 ; Store $00 in $20
sta $22 ; Store $00 in $22
! ; lda #$02 ; Load accumulator with $02
! lda #$30 ; Load accumulator with page of user RAM
Code:
; Begin test for free ram
;
ldy #$01 ; Load register Y with $01
!
! ; fake out the top of memory to a constant
! lda #$40
! sta $23
!
! MEM_T LDA (C_22),Y ; Load accumulator With the contents of a byte of memory
tax ; Save it to X
eor #$FF ; Next 4 instuctions test to see if this memeory location
sta (C_22),Y ; is ram by trying to write something new to it - new value
cmp (C_22),Y ; gets created by XORing the old value with $FF - store the
! ; patch out first of four bytes to defang the memory test
! ; php ; result of the test on the stack to look at later
txa ; Retrieve the old memory value
sta (C_22),Y ; Put it back where it came from
inc $22 ; Increment $22 (for next memory location)
bne SKP_PI ; Goto $14A6 if we don't need to increment page
inc $23 ; Increment $23 (for next memory page)
! ; patch out three more bytes to defang the memory test
! SKP_PI
! ; PLP ; Now look at the result of the memory test
! ; beq MEM_T ; Go test the next mempry location if the last one was ram
!
! DEY ; If last memory location did not test as ram, decrement Y (should be $00 now)
cld ; Make sure we're not in decimal mode
By adding and removing 4 bytes I've kept the length the same, which means no other adjustments.
Cheers Ed