X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/50f3b8f0cb6ccbdc5c1ea8f916f3d95b197d3d04..40df51aed30ddcd710c7356f8098516c27088392:/cbios/msgbuf.180 diff --git a/cbios/msgbuf.180 b/cbios/msgbuf.180 index a5dfa49..12d4861 100644 --- a/cbios/msgbuf.180 +++ b/cbios/msgbuf.180 @@ -7,7 +7,7 @@ ; global msg.sout global msg.sm,msg.recv - extrn bufinit + extrn bufinit,hwl2phy extrn fifolst include config.inc @@ -20,15 +20,15 @@ mkbuf 0,mtx.fifo,mtx.fifo_len mkbuf 1,mrx.fifo,mrx.fifo_len -;txfifo_addr equ fifolst + (0*3) -;rxfifo_addr equ fifolst + (1*3) +;txfifo_addr equ fifolst + (0*2) +;rxfifo_addr equ fifolst + (1*2) -itx equ 0*3 -irx equ 1*3 +itx equ 0*2 +irx equ 1*2 ;-------------------------------------------------------------- ; -; Init mssage fifos +; Init message fifos ; dseg @@ -38,18 +38,34 @@ msginit: jr nz,msgi_1 ld hl,(040h) +;TODO: physical to logical address translation ld a,l or h jr z,msgi_1 ld de,fifolst - ld bc,4*3 + ld bc,4*2 ldir ret msgi_1: + ld a,(043h) +;TODO: value should be 0 ld ix,mtx.fifo call bufinit + + ld hl,fifolst + call hwl2phy + ld (040h),hl + ld (040h+2),a + ld a,0ffh + ld (043h),a + out (AVRINT5),a +wait: + ld a,(043h) + or a + jr nz,wait + ld ix,mrx.fifo jp bufinit