🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.masscomp
Article #35

assembler routine for bcopy

#35
From: masscomp-request
Date: Sun, 07 Jun 1987 19:20
36 lines
1492 bytes
Here is an assembler routine to use in place of bcopy().

If you have assembler routines you'd like to share, please
send them to masscomp@soma.uucp.

Stan Barber
--------------------------------------------------------
| bcopy
| call from c just like the
| regular bcopy library routine.
| hopefully this one is much faster
|
| $Header: bcopy.s,v 1.1 87/06/06 17:35:10 sim Exp $
|
| By Stan Barber
| Copyright 1987 Stan Barber
| All Right Reserved. This code may be distributed freely
| as long as this copyright notice remains intact.
|
	.text
				| bcopy.c
	.globl	_bcopy
_bcopy:	link.w	a6,#0
				|
	move.l	(8,a6),a0	| load first pointer into a0
	move.l	(12,a6),a1	| load second pointer into a1
	move.l	(16,a6),d0	| load counter into d0
_bcp1:	move.b	(a0)+,(a1)+	| copy a byte from on to the other
				| and increment the pointer
	dbra	d0,_bcp1	| decrement the count and test
				| if still greater than zero 
				| branch back to the label
	unlk	a6
	rts
	.data
	.bss
Technical Details
Message-ID: <3130@soma.bcm.tmc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!soma!masscomp-request

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!soma!masscomp-request
From: masscomp-request@soma.UUCP
Newsgroups: comp.sys.masscomp
Subject: assembler routine for bcopy
Message-ID: <3130@soma.bcm.tmc.edu>
Date: Sun, 7-Jun-87 15:20:20 EDT
Article-I.D.: soma.3130
Posted: Sun Jun  7 15:20:20 1987
Date-Received: Thu, 11-Jun-87 01:01:02 EDT
Sender: masscomp@soma.bcm.tmc.edu
Lines: 36
Approved: masscomp@soma.bcm.tmc.edu