X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp-cpm3.git/blobdiff_plain/50f3b8f0cb6ccbdc5c1ea8f916f3d95b197d3d04..3ba537752998f2d8554cecee5d586fd1a70256b6:/cbios/msgbuf.180 diff --git a/cbios/msgbuf.180 b/cbios/msgbuf.180 index a5dfa49..7b70d54 100644 --- a/cbios/msgbuf.180 +++ b/cbios/msgbuf.180 @@ -7,57 +7,70 @@ ; global msg.sout global msg.sm,msg.recv - extrn bufinit + 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*3) -;rxfifo_addr equ fifolst + (1*3) - -itx equ 0*3 -irx equ 1*3 +itx equ 0*2 +irx equ 1*2 ;-------------------------------------------------------------- ; -; Init mssage fifos +; Init message fifos ; dseg - msginit: ld a,(INIDONE) cp INIDONEVAL jr nz,msgi_1 ld hl,(040h) + ld a,(040h+2) + call phy2log + 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 + push ix + pop hl + 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 ;-------------------------------------------------------------- - cseg - + dseg msgi.st: push ix ld ix,(fifolst+irx) ;