FatMario
by fiskbit
Game: SMW
Description: Coins slow you down
lda $00 pha ; Use half the coins as the limit. lda #$64 sec sbc $dbf ; Is Mario moving positive or negative? bit $7b bpl positive ; Negative. Invert the limit. eor #$ff sta $00 ; If the speed is faster (smaller) than the limit, cap it. lda $7b cmp $00 bcs done bcc cap positive: sta $00 lda $7b cmp $00 bcc done cap: lda $00 sta $7b done: pla sta $00 rtlback to listings