# HG changeset patch # User boisy # Date 1042776767 0 # Node ID b2983d97e218da464ac9dbe57e8f40ba486c8233 # Parent c684d4897a63fadf19b7dfdea523a6f785798a35 Added for later use diff -r c684d4897a63 -r b2983d97e218 3rdparty/drivers/s16550/s16550.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/s16550/s16550.asm Fri Jan 17 04:12:47 2003 +0000 @@ -0,0 +1,1194 @@ +00001 nam s16550 +00002 ttl os9 device driver +00003 +00004 * Disassembled 96/09/20 17:17:26 by Disasm v1.5 (C) 1988 by RML +00005 +00006 ifp1 +00007 use /dd/defs/os9defs +00008 endc +00009 00E1 tylg set Drivr+Objct +00010 0081 atrv set ReEnt+rev +00011 0001 rev set $01 +00012 0000 87CD0799 mod eom,name,tylg,atrv,start,size + +00013 D 0000 u0000 rmb 1 V.PAGE +00014 D 0001 u0001 rmb 2 V.PORT +00015 D 0003 u0003 rmb 1 V.LPRC +00016 D 0004 u0004 rmb 1 V.BUSY +00017 D 0005 u0005 rmb 1 V.WAKE +00018 D 0006 u0006 rmb 1 V.TYPE + u0007 rmb 1 V.LINE +00019 D 0008 u0008 rmb 1 V.PAUS +00020 D 0009 u0009 rmb 2 V.DEV2 +00022 D 000B u000B rmb 1 V.INTR +00023 D 000C u000C rmb 1 V.QUIT +00024 D 000D u000D rmb 1 V.PCHR +00025 D 000E u000E rmb 1 V.ERR +00026 D 000F u000F rmb 1 V.XON +00027 D 0010 u0010 rmb 4 V.XOFF + u0011 rmb 1 V.KANJI + u0012 rmb 2 V.KBUF +00028 D 0014 u0014 rmb 2 V.MODADR +00029 D 0016 u0016 rmb 2 V.PDLHD + u0018 rmb 5 V.RSV +00030 D 001D u001D rmb 1 +00031 D 001E u001E rmb 1 +00032 D 001F u001F rmb 1 +00033 D 0020 u0020 rmb 1 +00034 D 0021 u0021 rmb 1 +00035 D 0022 u0022 rmb 1 +00036 D 0023 u0023 rmb 2 +00037 D 0025 u0025 rmb 2 +00038 D 0027 u0027 rmb 1 * signal code (for send) +00039 D 0028 u0028 rmb 1 +00040 D 0029 u0029 rmb 1 +00041 D 002A u002A rmb 2 +00042 D 002C u002C rmb 2 +00043 D 002E u002E rmb 2 +00044 D 0030 u0030 rmb 2 +00045 D 0032 u0032 rmb 2 V.BUFADDR +00046 D 0034 u0034 rmb 1 +00047 D 0035 u0035 rmb 1 +00048 D 0036 u0036 rmb 2 V.BUFSIZ +00049 D 0038 u0038 rmb 2 xmit buff addr? +00050 D 003A u003A rmb 1 +00051 D 003B u003B rmb 1 +00052 D 003C u003C rmb 2 +00053 D 003E u003E rmb 2 +00054 D 0040 u0040 rmb 1 +00055 D 0041 u0041 rmb 2 +00056 D 0043 u0043 rmb 1 +00057 D 0044 u0044 rmb 52 +00058 D 0078 u0078 rmb 8 +00059 D 0080 u0080 rmb 128 * ???baud table??? + +00060 D 0100 size equ . +00061 000D 03 fcb $03 +00062 000E name equ * +00063 000E 73313635 fcs /s16550/ +00064 0014 10 fcb $10 +00065 0015 03 L0015 fcb $03 + +00066 0016 start equ * +00067 0016 16005A lbra Iniz |SCF jump table +00068 0019 160160 lbra Read | +00069 001C 160114 lbra Write | +00070 001F 1601EC lbra GetSta | +00071 0022 160324 lbra SetSta | +* Term | + +00072 0025 5F clrb +00073 0026 340D pshs dp,b,cc +00074 0028 1704FB lbsr UtoDP + +00075 002B 1A50 orcc #$50 +00076 002D 4F clra +00077 002E DD34 std $0050 +00085 003F A684 lda ,x +00086 0041 9704 sta stack +00115 0080 308D06CF leax >Data,pcr |addr packet +00116 0084 318D04B3 leay >IRQser,pcr |addr irq service routine +00117 0088 103F2A os9 F$IRQ |add to poll +00118 008B 3520 puls y dev.desc. addr +00119 008D 2406 bcc checkdesc + +00120 008F 3503 puls a,cc +00121 0091 1A01 orcc #$01 +00122 0093 3588 puls pc,dp +00123 0095 A6A811 checkdesc lda <$11,y bytes in init table +00124 0098 811C cmpa #$1C +00125 009A 230E bls L00AA + +00126 009C A6A82E lda <$2E,y +00127 009F 8410 anda #$10 +00128 00A1 971F sta u0100,u +00167 00F0 9F3C stx L0015,pcr +00184 0116 2B03 bmi L011B + +00185 0118 B7FF7F sta >$FF7F * set mpi slot +00186 011B B6FF23 L011B lda >$FF23 * CART IRQ flag +00187 011E 84FC anda #$FC +00188 0120 B7FF23 sta >$FF23 * CART IRQ ctrl +00189 0123 B6FF22 lda >$FF22 * ???ram size??? +00190 0126 B60092 lda >$0092 +00191 0129 8A01 ora #$01 +00192 012B B70092 sta >$0092 +00193 012E B7FF92 sta >$FF92 * IRQENR irq enable +00194 0131 358D puls pc,dp,b,cc +00195 0133 5F Write clrb +00196 0134 340D pshs dp,b,cc +00197 0136 1703ED lbsr UtoDP u=dev mem area + +00198 0139 9E38 ldx $0050 +00222 016A E68819 ldb <$19,x +00223 016D 2704 beq L0173 + +00224 016F C103 cmpb #$03 +00225 0171 2306 bls L0179 + +00226 0173 E60C L0173 ldb $0C,x +00227 0175 C402 andb #$02 +00228 0177 2702 beq L017B + +00229 0179 1A01 L0179 orcc #$01 +00230 017B 39 L017B rts +00231 017C 5F Read clrb +00232 017D 340D pshs dp,b,cc +00233 017F 1703A4 lbsr UtoDP dev.mem. to dp + +00234 0182 D60E ldb $0050 +00370 0299 E606 ldb $06,x * |dest task num +00371 029B B600D0 lda >$00D0 * |source task num +00372 029E 3570 puls u,y,x * |dest pt, bytes, srce pt +00373 02A0 103F38 os9 F$Move * |move data +00374 02A3 1A50 orcc #$50 +00375 02A5 DC34 ldd L0756,pcr +00422 0310 9E01 ldx $0050 +00482 0385 A606 lda $06,x +00483 0387 F600D0 ldb >$00D0 +00484 038A DE38 ldu $0050 +00674 0513 9705 sta $FFF3 +00694 0539 002C neg L052D,pcr +00710 055E C40E andb #$0E +00711 0560 3A abx +00712 0561 1F50 tfr pc,d +00713 0563 E384 addd ,x +00714 0565 1F05 tfr d,pc +00715 0567 E622 L0567 ldb $02,y +00716 0569 C501 bitb #$01 +00717 056B 27ED beq L055A + +00718 056D 9605 lda $C10E +00972 076E 0078 neg