Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,27 @@
ExponentUnsigned:
;input: D0.W = BASE
; D1.W = EXPONENT
; OUTPUTS TO D0
; NO OVERFLOW PROTECTION - USE AT YOUR OWN RISK!
;HIGH WORDS OF D0 AND D1 ARE CLEARED.
;clobbers D1
MOVE.L D2,-(SP)
;using DBRAs lets us simultaneously subtract and compare
DBRA D1,.test_if_one
MOVEQ.L #1,D0 ;executes only if D1 was 0 to start with
.test_if_one:
DBRA D1,.go
bra .done ;executes only if D1 was 1 to start with
.go:
;else, multiply D0 by its ORIGINAL self repeatedly.
MOVE.L D0,D2
.loop:
MULU D0,D2
DBRA D1,.loop
MOVE.L D2,D0
.done:
MOVE.L (SP)+,D2
RTS