# HG changeset patch # User boisy # Date 1038926939 0 # Node ID be4e1a676e45c5c035396378ff38b7fba3903685 # Parent 8622c2a17b473409c71ba10e4a1cc3d73afab285 Added labels and comments diff -r 8622c2a17b47 -r be4e1a676e45 3rdparty/drivers/s16550/s16550_large.asm --- a/3rdparty/drivers/s16550/s16550_large.asm Tue Dec 03 14:48:06 2002 +0000 +++ b/3rdparty/drivers/s16550/s16550_large.asm Tue Dec 03 14:48:59 2002 +0000 @@ -62,7 +62,7 @@ u0034 rmb 1 u0035 rmb 1 u0036 rmb 2 -u0038 rmb 2 +OutNxt rmb 2 u003A rmb 1 u003B rmb 1 u003C rmb 2 @@ -90,57 +90,70 @@ lbra SetStat lbra Term +* Init +* +* Entry: +* Y = address of device descriptor +* U = address of device memory area +* +* Exit: +* CC = carry set on error +* B = error code +* Init clrb pshs dp,b,cc - lbsr L05C3 + lbsr GetDP ldd L07E0,pcr - leay >L05D7,pcr - os9 F$IRQ - puls y - bcc L004A + pshs y save Y + leax >IRQPkt,pcr + leay >IRQRtn,pcr + os9 F$IRQ install interrupt service routine + puls y restore Y + bcc L004A branch if ok puls a,cc - orcc #Carry - puls pc,dp -L004A lda <$11,y - cmpa #$1C - bls L005F - lda <$2E,y + orcc #Carry set error flag + puls pc,dp exit with error +L004A lda L05D7,pcr + leay >IRQRtn,pcr os9 F$IRQ puls y puls dp,b,cc orcc #Carry rts -L0087 stx u0100,u stx $0092 sta >$FF92 puls pc,dp,b,cc + Write clrb pshs dp,b,cc - lbsr L05C3 - ldx $0050 - ldb D.Proc + ldb $0050 lda $06,x ldb >$00D0 - ldu L05D7,pcr + leay >IRQRtn,pcr os9 F$IRQ puls y puls pc,dp,b,cc @@ -768,7 +782,9 @@ ldx #$0001 os9 F$Sleep rts -L05C3 pshs u + +* Transfer hi-byte of U to Direct Page +GetDP pshs u puls dp leas $01,s rts @@ -776,9 +792,9 @@ L05CA fdb $0160,$0115,$001b,$01bb,$0004,$0004,$002a * IRQ Service Routine -L05D7 fcb $5f +IRQRtn fcb $5f L05D8 pshs dp,b,cc - bsr L05C3 + bsr GetDP clr