diff options
author | B. Watson <yalhcru@gmail.com> | 2016-01-14 17:59:58 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-01-14 17:59:58 -0500 |
commit | 06f2620ead18279afdd2501c3fef409252aa7ea0 (patch) | |
tree | 2ce3735ef6d39d973c270dd7bce161449c8ab7c7 /bignum.s | |
parent | f004009a5e52f617ef1f11639a1b810f687ffe2f (diff) | |
download | taipan-06f2620ead18279afdd2501c3fef409252aa7ea0.tar.gz |
big_copy() API for bignum
Diffstat (limited to 'bignum.s')
-rw-r--r-- | bignum.s | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -3,7 +3,7 @@ .importzp ptr3, ptr4, sreg .import popeax, popax, pushax, _memcmp .export _ulong_to_big, _big_to_ulong, _big_add, _big_sub, _big_mul, _big_div - .export _bank_maxed_out, _big_cmp + .export _bank_maxed_out, _big_cmp, _big_copy .include "atari.inc" @@ -34,15 +34,6 @@ fr0_to_fptemp: bpl @l rts -fr0_to_fr1: - ldx #5 -@l: - lda FR0,x - sta FR1,x - dex - bpl @l - rts - fptemp_to_fr0: ldx #5 @l: @@ -105,6 +96,17 @@ trunc_fr0: rts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; void __fastcall__ big_copy(bignump dest, bignump src) +_big_copy: + sta FLPTR ; src arg in FLPTR + stx FLPTR+1 + jsr FLD0P ; load src value into FR0 + jsr popax ; get dest arg + sta FLPTR ; dest arg in FLPTR + stx FLPTR+1 + jmp FST0P ; store FR0 value into dest + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; void __fastcall__ big_binary_op(bignump dest, bignump a, bignump b, unsigned int jsraddr); _big_binary_op: |