Changeset 4f508e6 in buchla-68k for lib700/blkmove.s
- Timestamp:
- 07/01/2017 02:34:46 PM (7 years ago)
- Branches:
- master
- Children:
- 08e1da1
- Parents:
- f40a309
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib700/blkmove.s
rf40a309 r4f508e6 1 *------------------------------------------------------------------------------2 *blkmove.s -- block move function3 *Version 1 -- 1987-08-28 -- D.N. Lynx Crowe4 * 5 *void6 *blkmove(to, from, n)7 * char *to, *from;8 *short n;9 * 10 *Copies 'n' bytes from address 'from' to address 'to'.11 *Treats overlaps of from and to areas intelligently.12 *------------------------------------------------------------------------------1 | ------------------------------------------------------------------------------ 2 | blkmove.s -- block move function 3 | Version 1 -- 1987-08-28 -- D.N. Lynx Crowe 4 5 | void 6 | blkmove(to, from, n) 7 | char |to, |from; 8 | short n; 9 10 | Copies 'n' bytes from address 'from' to address 'to'. 11 | Treats overlaps of from and to areas intelligently. 12 | ------------------------------------------------------------------------------ 13 13 .text 14 * 14 15 15 .xdef _blkmove 16 * 17 _blkmove: link a6,# $FFFC16 17 _blkmove: link a6,#-4 18 18 move.l 8(a6),d0 19 19 cmp.l 12(a6),d0 20 20 bcc blkm3 21 * 21 22 22 bra blkm2 23 * 23 24 24 blkm1: movea.l 8(a6),a0 25 25 movea.l 12(a6),a1 … … 27 27 addq.l #1,8(a6) 28 28 addq.l #1,12(a6) 29 * 29 30 30 blkm2: move.w 16(a6),d0 31 31 subq.w #1,16(a6) 32 32 tst.w d0 33 33 bne blkm1 34 * 34 35 35 bra blkm6 36 * 36 37 37 blkm3: move.w 16(a6),d0 38 38 ext.l d0 … … 40 40 add.l d0,12(a6) 41 41 bra blkm5 42 * 42 43 43 blkm4: subq.l #1,8(a6) 44 44 subq.l #1,12(a6) … … 46 46 movea.l 12(a6),a1 47 47 move.b (a1),(a0) 48 * 48 49 49 blkm5: move.w 16(a6),d0 50 50 subq.w #1,16(a6) 51 51 tst.w d0 52 52 bne blkm4 53 * 53 54 54 blkm6: unlk a6 55 55 rts 56 * 56 57 57 .end
Note:
See TracChangeset
for help on using the changeset viewer.