mirror of https://github.com/wwarthen/RomWBW.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
896 B
27 lines
896 B
; memory.asm 2/1/2012 dwg - memory library implementation
|
|
; maclib z80
|
|
|
|
;memcpy macro h=src,d==dst,bc=size
|
|
public x$memcpy
|
|
x$memcpy:
|
|
ldir
|
|
0000 C9 ret
|
|
|
|
; memset macro h=dst,a=data,c=siz
|
|
public x$memset
|
|
x$memset:
|
|
0001 F5 push psw
|
|
x$ms$loop:
|
|
0002 F1 pop psw
|
|
0003 77 mov m,a
|
|
0004 23 inx h
|
|
0005 0B dcx b
|
|
0006 F5 push psw
|
|
0007 78 mov a,b
|
|
0008 B1 ora c
|
|
0009 C20200 jnz x$ms$loop
|
|
000C F1 pop psw
|
|
000D C9 ret
|
|
|
|
; eof - memory.asm
|
|
|