mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-19 10:42:10 +00:00
Use zero page locations as as pseudo-registers; 8-bit multiplication and 16-bit shifts
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
|
||||
inline asm byte __mul_u8u8u8() {
|
||||
? LDA #0
|
||||
? JMP start
|
||||
add:
|
||||
CLC
|
||||
ADC __reg.lo
|
||||
loop:
|
||||
ASL __reg.lo
|
||||
start:
|
||||
LSR __reg.hi
|
||||
BCS add
|
||||
BNE loop
|
||||
? RTS
|
||||
}
|
||||
Reference in New Issue
Block a user