mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-12 14:04:28 +00:00
Library: added cbm/c64/memmove.a with a macro to call $a3bf in basic interpreter
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@69 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
5240b5eff4
commit
a6ca824eb7
31
ACME_Lib/cbm/c64/memmove.a
Normal file
31
ACME_Lib/cbm/c64/memmove.a
Normal file
@ -0,0 +1,31 @@
|
||||
;ACME 0.95.7
|
||||
|
||||
!ifdef lib_cbm_c64_memmove_a !eof
|
||||
lib_cbm_c64_memmove_a = 1
|
||||
|
||||
; this macro inserts code to move a memory block.
|
||||
; it calls a function from the basic interpreter, so:
|
||||
; - BASIC ROM must be banked in
|
||||
; - the source block must be below $a000 so it can be read
|
||||
; source and target blocks are allowed to overlap.
|
||||
!macro basic_memmove .src_start, .src_end, .target_start {
|
||||
!address {
|
||||
.z_target_end = $58
|
||||
.z_src_end = $5a
|
||||
.z_src_start = $5f
|
||||
.fn = $a3bf
|
||||
}
|
||||
lda #<.src_start
|
||||
ldx #>.src_start
|
||||
sta .z_src_start
|
||||
stx .z_src_start + 1
|
||||
lda #<.src_end
|
||||
ldx #>.src_end
|
||||
sta .z_src_end
|
||||
stx .z_src_end + 1
|
||||
lda #<(.target_start + .src_end - .src_start)
|
||||
ldx #>(.target_start + .src_end - .src_start)
|
||||
sta .z_target_end
|
||||
stx .z_target_end + 1
|
||||
jsr .fn
|
||||
}
|
Loading…
Reference in New Issue
Block a user