Migration from TFC3 to Relaunch64
Migration from TFC3 to Relaunch64
Hello all,
Allow me to appoligise now for the long winded post.
Ive decided to get back into the 6502 after a few decades of taking a brake. I was even to recover some of my old books from Bombjack64, my favorite being Jim Butterfields'
Machine language for the C64. I admit even in that time I was no great coder in assembly, but I had the book and TFC. I currently have, along with actual hardware, VICE and TFC3 running on Ubuntu.
With TFC3 (mon) I can insert code within exact memory locations and execute it with G and the memory address, as well as breaking and returning at a desired location. This concept is quite easy to understand. I was excited to find 'relaunch64' online and have configured it to run with kickasembler and 64tass.
I can see the benefit to writing code in this manner but I have already encountered hurdles that has left me frustrated.
1. I am used to writing the code at a memory loction and having it automaticlly incriment to the next location. This also gives me an understanding of where I will start my execution and where it will BRK. I do not grasp this under relaunch64.
2. There are several assembler and I dont know which would be best to start out with. I am currently using the two mention before.
even the simplest programs compiles but does not produce the desired output
lda #$48
jsr $ff2
brk
something like this produces the letter as expected in TFC3
I would like to learn this relaunch64 method of coding but ive hit a wall.
Allow me to appoligise now for the long winded post.
Ive decided to get back into the 6502 after a few decades of taking a brake. I was even to recover some of my old books from Bombjack64, my favorite being Jim Butterfields'
Machine language for the C64. I admit even in that time I was no great coder in assembly, but I had the book and TFC. I currently have, along with actual hardware, VICE and TFC3 running on Ubuntu.
With TFC3 (mon) I can insert code within exact memory locations and execute it with G and the memory address, as well as breaking and returning at a desired location. This concept is quite easy to understand. I was excited to find 'relaunch64' online and have configured it to run with kickasembler and 64tass.
I can see the benefit to writing code in this manner but I have already encountered hurdles that has left me frustrated.
1. I am used to writing the code at a memory loction and having it automaticlly incriment to the next location. This also gives me an understanding of where I will start my execution and where it will BRK. I do not grasp this under relaunch64.
2. There are several assembler and I dont know which would be best to start out with. I am currently using the two mention before.
even the simplest programs compiles but does not produce the desired output
lda #$48
jsr $ff2
brk
something like this produces the letter as expected in TFC3
I would like to learn this relaunch64 method of coding but ive hit a wall.
Re: Migration from TFC3 to Relaunch64
Ok ive made some strides.
*='startaddress'
and sys 'startaddress'
*='startaddress'
and sys 'startaddress'
Re: Migration from TFC3 to Relaunch64
i would suggest to use ACME or 64TASS instead of kickass - simply because kickass works very different from a lot of other assemblers. both i think can be used with relaunch64 too.
Re: Migration from TFC3 to Relaunch64
Is this a valid call to a subroutine. This is a snip from coe im working on. seems to get caught in loopand run out of memory
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
TSTLINE
ldy #$0 ; Y coordunate for cursor
ldx #$8 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
brk
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
TSTLINE
ldy #$0 ; Y coordunate for cursor
ldx #$8 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
brk
Re: Migration from TFC3 to Relaunch64
You need an RTS after your BNE
Re: Migration from TFC3 to Relaunch64
also, you probably dont want to end your code with a BRK, but with RTS instead - then it will cleanly (more or less, depending what your code does =P) return to BASIC after SYS. this BRK thing only works when starting the code from a monitor that hooks the BRK vector
Re: Migration from TFC3 to Relaunch64
why does rts drop me back to basic instead of returning from subroutine, am I implimenting it wrong?
some previous code.......
bla bla bla
BOTTOMLINE
ldy #$0 ; Y coordunate for cursor
ldx #$14 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
rts
TSTLINE
ldy #$0 ; Y coordunate for cursor
ldx #$8 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
END
rts
some previous code.......
bla bla bla
BOTTOMLINE
ldy #$0 ; Y coordunate for cursor
ldx #$14 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
rts
TSTLINE
ldy #$0 ; Y coordunate for cursor
ldx #$8 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
END
rts
Re: Migration from TFC3 to Relaunch64
Code is executed in a specific order, from top to bottom. In your example below, your RTS and the end of your LINE routeing ReTurns from Subroutine and this is why your being dropped back to basic. TSTLINE is never reached as there are no JSR TSTLINE included in your code, Jump SubRoutine.
ldy #$00 ; Y coordunate for cursor
ldx #$14 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr line
ldy #$00 ; Y coordunate for cursor
ldx #$08 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
rts
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
rts
STARTBOTTOMLINE
ldy #$0 ; Y coordunate for cursor
ldx #$14 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
rts
TSTLINE
ldy #$0 ; Y coordunate for cursor
ldx #$8 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
END
rts
ldy #$00 ; Y coordunate for cursor
ldx #$14 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr line
ldy #$00 ; Y coordunate for cursor
ldx #$08 ; X coordinate for cursor
clc ; carry
jsr $fff0 ; move cursor
ldx #$00 ; let X=0
jsr LINE
rts
LINE
lda #$64
jsr $ffd2
inx ; X=X+1
cpx #$28 ; does X = hex 28
bne LINE ; branch to LINE of not 28
rts
Re: Migration from TFC3 to Relaunch64
SYS from basic is equivalent to JSR in ml ... so this code:why does rts drop me back to basic instead of returning from subroutine, am I implimenting it wrong?
Code: Select all
*=$1000
inc $d020
rts
compare with this code
Code: Select all
*=$1000
inc $d020
brk
Re: Migration from TFC3 to Relaunch64
Hi jrubin,
first of all, Relaunch64 is "just" an IDE for C64-cross-development that copes with many different assemblers. Basically, it is a text editor with some extra functions. When it comes to specific assembler syntaxes, you're talking about assembler issues, i.e. the questions might be related to ACME, KickAss, 64tass etc., and not about Relaunch64 issues. You could write the same code in any other editor. I'm emphasizing this because then you're probably not disappointed when you don't get your questions answered by the Relaunch64-manuals.
A good start for using Relaunch64 and its functions may be the C64-wiki: http://c64-wiki.com/index.php/Relaunch64
A good start for cross-development might be ACME or 64tass, as said above by dudz. In case you're using OS X, you can find compiled binaries of several assemblers and crunchers for download at http://www.popelganda.de/relaunch64.html
docs and manuals for assemblers are included in the zip-files from the project-homepages, I think.
first of all, Relaunch64 is "just" an IDE for C64-cross-development that copes with many different assemblers. Basically, it is a text editor with some extra functions. When it comes to specific assembler syntaxes, you're talking about assembler issues, i.e. the questions might be related to ACME, KickAss, 64tass etc., and not about Relaunch64 issues. You could write the same code in any other editor. I'm emphasizing this because then you're probably not disappointed when you don't get your questions answered by the Relaunch64-manuals.
A good start for using Relaunch64 and its functions may be the C64-wiki: http://c64-wiki.com/index.php/Relaunch64
A good start for cross-development might be ACME or 64tass, as said above by dudz. In case you're using OS X, you can find compiled binaries of several assemblers and crunchers for download at http://www.popelganda.de/relaunch64.html
docs and manuals for assemblers are included in the zip-files from the project-homepages, I think.
Who is online
Users browsing this forum: No registered users and 6 guests