X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/40df51aed30ddcd710c7356f8098516c27088392..3ba537752998f2d8554cecee5d586fd1a70256b6:/cbios/msgbuf.180 diff --git a/cbios/msgbuf.180 b/cbios/msgbuf.180 index 12d4861..7b70d54 100644 --- a/cbios/msgbuf.180 +++ b/cbios/msgbuf.180 @@ -7,22 +7,17 @@ ; global msg.sout global msg.sm,msg.recv - extrn bufinit,hwl2phy + extrn bufinit,hwl2phy,phy2log extrn fifolst include config.inc include z180reg.inc - cseg - - + dseg mkbuf 0,mtx.fifo,mtx.fifo_len mkbuf 1,mrx.fifo,mrx.fifo_len -;txfifo_addr equ fifolst + (0*2) -;rxfifo_addr equ fifolst + (1*2) - itx equ 0*2 irx equ 1*2 @@ -31,14 +26,15 @@ irx equ 1*2 ; Init message fifos ; dseg - msginit: ld a,(INIDONE) cp INIDONEVAL jr nz,msgi_1 ld hl,(040h) -;TODO: physical to logical address translation + ld a,(040h+2) + call phy2log + ld a,l or h jr z,msgi_1 @@ -50,11 +46,13 @@ msginit: msgi_1: ld a,(043h) + ;TODO: value should be 0 + ld ix,mtx.fifo call bufinit - - ld hl,fifolst + push ix + pop hl call hwl2phy ld (040h),hl ld (040h+2),a @@ -72,8 +70,7 @@ wait: ;-------------------------------------------------------------- - cseg - + dseg msgi.st: push ix ld ix,(fifolst+irx) ;