Started by Snektron, January 09, 2015, 05:41:10 pm
0 Members and 2 Guests are viewing this topic.
.dw ShdDraw_ .db AXM_ALL .dw $00F3 .db AXM_SUB .db AXM_1ARG .org 0 ld l, 0 call squareL bcall(_DispHL) bcall(_getKey) ret; square l, return in hlsquareL: ld hl, (SqLUT) ret SqLUT: .dw $0000, $0001, $0004, $0009, $0010, $0019... ShdDraw_:
squareL: ld h, 0 sla l rl h ;l*2 in hl REP_NEXT ld de, SqLUT add hl, de ; address in hl dec hl ld d, (hl) inc hl ld e, (hl) ex de, hl ret SqLUT: .dw $0000, $0001, $0004, $0009, $0010, $0019, $0024, $0031... etc
ld hl, SqLUT + 96 ; for debugging purposes, this is one of the faulty numbers (48) dec hl ld d, (hl) inc hl ld e, (hl) ex de, hl
.dw some_command_ .db AXM_ALL .dw token .db AXM_SUB .db AXM_1ARG .org $0000 REP_NEXT ; don't forget ld hl, sub_Axiom2 ; replace the 2 with whatever # command your data block is at ; start of the data address is now in hlsome_command_: .dw data_block_ .db AXM_ALL .dw $0000 ; it can only be called from other commands .db AXM_DATA .db AXM_1ARG .org $0000 ; data heredata_block_:
Quote from: DJ Omnimaga on January 10, 2015, 07:08:52 pmNot sure if I understand. Was it some sort of data usage conflict?
CodeWalr.us 2.0 © 2019, DJ Omnimaga & Juju
Page created in 0.039 seconds with 36 queries.