2 ; Ullrich von Bassewitz, 11.08.1998
4 ; char* DbgMemDump (unsigend Addr, char* Buf, unsigned char Length);
10 .importzp sp, tmp2, tmp3, tmp4, ptr3, ptr4
14 lda (sp),y ; Get length
17 lda (sp),y ; Get the string buffer
23 lda (sp),y ; Get the address
28 jsr addysp1 ; Drop the parameters
31 sta tmp2 ; String index
36 lda ptr4+1 ; Hi address byte
37 jsr dump ; Print address
38 lda ptr4 ; Lo address byte
40 jsr putspace ; Add a space
42 dump1: dec tmp4 ; Bytes left?
43 bmi dump9 ; Jump if no
44 jsr putspace ; Add a space
53 sta (ptr3),y ; Add string terminator
55 ldx ptr3+1 ; We assume this is not zero