Email or username:

Password:

Forgot your password?
Top-level
Eamon

@neauoire awesome, thank you! So if I label my function (or data structure) the normal way:
`@draw-character ( char -- )`

I can jump to it from any address within 127 bytes using any of the following, and they all work pretty much the same?
;draw-character JSR2 ( absolute call )
,draw-character JSR ( relative call )
draw-character ( relative immediate call )

(I was going to test this tonight.)

3 comments
Devil Lu Linvega

@eamon Yep, exactly. Unless you need to do pointer arithmetic(like get the routine address dynamically) you should always use immediate calls. In this case, I wouldn't manually choose to JSR to it, I'd use a relative immediate call.

Devil Lu Linvega

@eamon JSR/JMP/JCN opcodes are so you can run routines from a pointer, but in normal times, you should almost never use those. Left has a single JSR2 opcode for example:
git.sr.ht/~rabbits/left/tree/m

Eamon

@neauoire ahhh this clears up a lot. Thank you!

Go Up