+Cafeman #1 Posted March 25, 2003 When I coded 5200 Koffi, I often used this neat little expression: lda #<DLIRoutine sta VDLI lda #>DLIRoutine sta VDLI+1 It seems that Tasm doesn't support this feature. So my question -- does anyone know how to do the same thing in Tasm? Adv II's code is already customized for Tasm and I've been trying to stick to using Tasm. Quote Share this post Link to post Share on other sites
DEBRO #2 Posted March 25, 2003 I think you have to do it like... lda #(DLIRoutine & $FF); get low byte of the DLI routine sta VDLI lda #(DLIRoutine >>8); get the high byte of the DLI routine sta VDLI+1 Quote Share this post Link to post Share on other sites
+Cafeman #3 Posted March 25, 2003 You must be joking. Is there any explanation for such strange code?! (thanks though!) Quote Share this post Link to post Share on other sites
DEBRO #4 Posted March 25, 2003 lda (DLIRoutine & $FF) ...takes the address for DLIRoutine (lets say it's $4315) and does an and of $FF to mask the upper byte so you end up with $15 lda (DLIRoutine >>8) ...takes the address for DLIRoutine and right shifts it 8 bits so you end up with $43 Quote Share this post Link to post Share on other sites
+Cafeman #5 Posted March 25, 2003 Thanks, that does make sense after all. I've been using ORG's in the meantime, but this way is better. Quote Share this post Link to post Share on other sites