X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/5482d75ffeb537629e1fe0a82c3eb22986dcbbc5..2217c8551dde4e881d8e25ac7472c7fc1f103092:/avr/virt_ports.asm diff --git a/avr/virt_ports.asm b/avr/virt_ports.asm index 022d5d4..1fa8154 100644 --- a/avr/virt_ports.asm +++ b/avr/virt_ports.asm @@ -86,6 +86,10 @@ vport_tbl: .db TIMERPORT,7 .dw clockget .dw clockput + + .db DEBUGPORT,1 + .dw dbg_stat + .dw dbg_ctrl .db 0,0 ; Stop mark ;--------------------------------------------------------------------- @@ -100,6 +104,8 @@ portRead: clt vprw_start: + push yh + push yl .if PORT_DEBUG > 1 tst temp2 brne dvp_1 ;don't debug console status @@ -157,13 +163,22 @@ vprw_found: icall rcall printhex printstring " " + pop yl + pop yh ret dvp_2: rcall printhex printstring " " - ijmp ; relative port # in temp3 + ; relative port # in temp3 + icall + pop yl + pop yh + ret .else - ijmp + icall + pop yl + pop yh + ret .endif vprw_exit: @@ -174,6 +189,8 @@ vprw_exit: vport_in_dummy: ldi temp,0xff vport_out_dummy: + pop yl + pop yh ret @@ -219,6 +236,16 @@ dbgOut: ret +dbg_stat: + ldi temp,0 + ret + +dbg_ctrl: + bmov intstat,i_trace, temp,0 + ret + + + ;--------------------------------------------------------------------- ; vim:set ts=8 noet nowrap