\r
cseg\r
@ctbl:\r
- db 'AVRCON' ; device 0\r
+ db 'USB0 ' ; device 0\r
db mb$in$out\r
db baud$none\r
\r
- db 'ASCI0 ' ; device 1\r
+ db 'ASCI0 ' ; device 1\r
db mb$in$out+mb$serial+mb$soft$baud\r
db baud$19200\r
\r
- db 'ASCI1 ' ; device 2\r
+ db 'ASCI1 ' ; device 2\r
db mb$in$out+mb$serial+mb$soft$baud\r
db baud$19200\r
\r
- db 0 ; table terminator\r
+ db 0 ; table terminator\r
\r
\r
end\r
if 1 ; works with new memory map
- push bc
- push de
- push hl
-
out0 (bcr0l),c ; setup DMA count
out0 (bcr0h),b
+ push hl
+ push de
ld a,(src$bnk)
call bnk2phy
-
out0 (sar0l),l ; setup DMA src address
out0 (sar0h),h
out0 (sar0b),a
ex de,hl
ld a,(dst$bnk)
call bnk2phy
-
out0 (dar0l),l ; setup DMA dst address
out0 (dar0h),h
out0 (dar0b),a
ld a,M_DE0+M_NDWE1 ; enable DMA0
out0 (dstat),a ; move the block
- pop hl
pop de
- pop bc
-
+ pop hl
add hl,bc ; src must point past end block
ex de,hl
add hl,bc ; and so must dst