📄 usb_isr.bin
字号:
7000:6CF3 push ax
7000:6CF4 call _dwordwrite
7000:6CF9 add sp,0x08
#usbhost#1087: if (ints & OHCI_INTR_RHSC) {
7000:6CFC test [ints],0x0040
7000:6D01 jnz #usbhost#1089
7000:6D03 jmp #usbhost#1137
#usbhost#1089: if((rhs = DWordRead(&ohci_regs->status)) != 0) {
7000:6D06 mov ax,[_ohci_regs]
7000:6D09 add ax,0x0050
7000:6D0C push [0x126c]
7000:6D10 push ax
7000:6D11 call _dwordread
7000:6D16 pop cx
7000:6D17 pop cx
7000:6D18 mov [bp-0x06],dx
7000:6D1B mov [rhs],ax
7000:6D1E or ax,dx
7000:6D20 jz #usbhost#1093
#usbhost#1090: rhs = rhs;
7000:6D22 mov dx,[bp-0x06]
7000:6D25 mov ax,[rhs]
7000:6D28 mov [bp-0x06],dx
7000:6D2B mov [rhs],ax
#usbhost#1091: }
7000:6D2E jmp #usbhost#1137
#usbhost#1093: else if((rhpt1s = DWordRead(&ohci_regs->portstatus1)) != 0) {
7000:6D31 mov ax,[_ohci_regs]
7000:6D34 add ax,0x0054
7000:6D37 push [0x126c]
7000:6D3B push ax
7000:6D3C call _dwordread
7000:6D41 pop cx
7000:6D42 pop cx
7000:6D43 mov [bp-0x0a],dx
7000:6D46 mov [rhpt1s],ax
7000:6D49 or ax,dx
7000:6D4B jnz #usbhost#1094
7000:6D4D jmp #usbhost#1137
#usbhost#1094: if(rhpt1s & RH_PS_PRSC) { //Port reset status change
7000:6D50 mov dx,[bp-0x0a]
7000:6D53 mov ax,[rhpt1s]
7000:6D56 and ax,0x0000
7000:6D59 and dx,0x10
7000:6D5C or ax,dx
7000:6D5E jnz #usbhost#1095
7000:6D60 jmp #usbhost#1105
#usbhost#1095: DWordWrite(&ohci_regs->portstatus1, RH_PS_PRSC);
7000:6D63 mov ax,0x0010
7000:6D66 xor dx,dx
7000:6D68 push ax
7000:6D69 push dx
7000:6D6A mov ax,[_ohci_regs]
7000:6D6D add ax,0x0054
7000:6D70 push [0x126c]
7000:6D74 push ax
7000:6D75 call _dwordwrite
7000:6D7A add sp,0x08
#usbhost#1096: if(rhpt1s & RH_PS_PESC)
7000:6D7D mov dx,[bp-0x0a]
7000:6D80 mov ax,[rhpt1s]
7000:6D83 and ax,0x0000
7000:6D86 and dx,0x02
7000:6D89 or ax,dx
7000:6D8B jz #usbhost#1098
#usbhost#1097: DWordWrite(&ohci_regs->portstatus1, RH_PS_PESC);
7000:6D8D mov ax,0x0002
7000:6D90 xor dx,dx
7000:6D92 push ax
7000:6D93 push dx
7000:6D94 mov ax,[_ohci_regs]
7000:6D97 add ax,0x0054
7000:6D9A push [0x126c]
7000:6D9E push ax
7000:6D9F call _dwordwrite
7000:6DA4 add sp,0x08
#usbhost#1098: if(rhpt1s & RH_PS_CSC)
7000:6DA7 mov dx,[bp-0x0a]
7000:6DAA mov ax,[rhpt1s]
7000:6DAD and ax,0x0000
7000:6DB0 and dx,0x01
7000:6DB3 or ax,dx
7000:6DB5 jz #usbhost#1100
#usbhost#1099: DWordWrite(&ohci_regs->portstatus1, RH_PS_CSC);
7000:6DB7 mov ax,0x0001
7000:6DBA xor dx,dx
7000:6DBC push ax
7000:6DBD push dx
7000:6DBE mov ax,[_ohci_regs]
7000:6DC1 add ax,0x0054
7000:6DC4 push [0x126c]
7000:6DC8 push ax
7000:6DC9 call _dwordwrite
7000:6DCE add sp,0x08
#usbhost#1100: rhpt1s = DWordRead(&ohci_regs->portstatus1);
7000:6DD1 mov ax,[_ohci_regs]
7000:6DD4 add ax,0x0054
7000:6DD7 push [0x126c]
7000:6DDB push ax
7000:6DDC call _dwordread
7000:6DE1 pop cx
7000:6DE2 pop cx
7000:6DE3 mov [bp-0x0a],dx
7000:6DE6 mov [rhpt1s],ax
#usbhost#1101: if((rhpt1s & RH_PS_CCS) == RH_PS_CCS){ //Check is connect
7000:6DE9 mov dx,[bp-0x0a]
7000:6DEC mov ax,[rhpt1s]
7000:6DEF and ax,0x0001
7000:6DF2 and dx,0x00
7000:6DF5 or dx,dx
7000:6DF7 jnz #usbhost#1105
7000:6DF9 cmp ax,0x0001
7000:6DFC jnz #usbhost#1105
#usbhost#1102: g_OHCIAttach = 1;
7000:6DFE mov byte ptr [_g_ohciattach],0x01
#usbhost#1105: if(rhpt1s & RH_PS_CSC){ //Port connect status change
7000:6E03 mov dx,[bp-0x0a]
7000:6E06 mov ax,[rhpt1s]
7000:6E09 and ax,0x0000
7000:6E0C and dx,0x01
7000:6E0F or ax,dx
7000:6E11 jnz #usbhost#1106
7000:6E13 jmp #usbhost#1137
#usbhost#1106: if(rhpt1s & RH_PS_CCS) {
7000:6E16 test [rhpt1s],0x0001
7000:6E1B jz #usbhost#1111
#usbhost#1107: DWordWrite(&ohci_regs->portstatus1, RH_PS_PES); //Port1 Status, set port enable
7000:6E1D xor ax,ax
7000:6E1F mov dx,0x0002
7000:6E22 push ax
7000:6E23 push dx
7000:6E24 mov ax,[_ohci_regs]
7000:6E27 add ax,0x0054
7000:6E2A push [0x126c]
7000:6E2E push ax
7000:6E2F call _dwordwrite
7000:6E34 add sp,0x08
#usbhost#1108: UART_SendData(buf, sizeof(buf));
7000:6E37 mov ax,0x0020
7000:6E3A push ax
7000:6E3B mov ax,0x0f84
7000:6E3E push ax
7000:6E3F call _uart_senddata
7000:6E44 pop cx
7000:6E45 pop cx
#usbhost#1109: g_OHCIAttach = 1;
7000:6E46 mov byte ptr [_g_ohciattach],0x01
#usbhost#1110: }
7000:6E4B jmp #usbhost#1131
#usbhost#1111: else if(rhpt1s & RH_PS_PESC) {
7000:6E4E mov dx,[bp-0x0a]
7000:6E51 mov ax,[rhpt1s]
7000:6E54 and ax,0x0000
7000:6E57 and dx,0x02
7000:6E5A or ax,dx
7000:6E5C jnz #usbhost#1112
7000:6E5E jmp #usbhost#1131
#usbhost#1112: DWordWrite(&ohci_regs->portstatus1, RH_PS_PESC);
7000:6E61 mov ax,0x0002
7000:6E64 xor dx,dx
7000:6E66 push ax
7000:6E67 push dx
7000:6E68 mov ax,[_ohci_regs]
7000:6E6B add ax,0x0054
7000:6E6E push [0x126c]
7000:6E72 push ax
7000:6E73 call _dwordwrite
7000:6E78 add sp,0x08
#usbhost#1113: if((rhpt1s & RH_PS_CCS) == RH_PS_CCS){
7000:6E7B mov dx,[bp-0x0a]
7000:6E7E mov ax,[rhpt1s]
7000:6E81 and ax,0x0001
7000:6E84 and dx,0x00
7000:6E87 or dx,dx
7000:6E89 jnz #usbhost#1118
7000:6E8B cmp ax,0x0001
7000:6E8E jnz #usbhost#1118
#usbhost#1114: UART_SendData(buf, sizeof(buf));
7000:6E90 mov ax,0x0020
7000:6E93 push ax
7000:6E94 mov ax,0x0f84
7000:6E97 push ax
7000:6E98 call _uart_senddata
7000:6E9D pop cx
7000:6E9E pop cx
#usbhost#1115: g_OHCIAttach = 1;
7000:6E9F mov byte ptr [_g_ohciattach],0x01
#usbhost#1116: }
7000:6EA4 jmp #usbhost#1131
#usbhost#1118: p=buf;
7000:6EA6 mov si,0x0f84
#usbhost#1119: q=buf4;
7000:6EA9 lea ax,[buf4]
7000:6EAD mov di,ax
#usbhost#1120: for(i=0;i<sizeof(buf4);i++)
7000:6EAF mov [i],0x0000
7000:6EB4 jmp +0x09
#usbhost#1121: *p++ = *q++;
7000:6EB6 mov al,[di]
7000:6EB8 mov [si],al
7000:6EBA inc di
7000:6EBB inc si
#usbhost#1120: for(i=0;i<sizeof(buf4);i++)
7000:6EBC inc [i]
7000:6EBF cmp [i],0x1c
7000:6EC3 jl #usbhost#1121
#usbhost#1122: *p++ = 10;
7000:6EC5 mov byte ptr [si],0x0a
7000:6EC8 inc si
#usbhost#1123: *p++ = 13;
7000:6EC9 mov byte ptr [si],0x0d
7000:6ECC inc si
#usbhost#1124: UART_SendData(buf, sizeof(buf));
7000:6ECD mov ax,0x0020
7000:6ED0 push ax
7000:6ED1 mov ax,0x0f84
7000:6ED4 push ax
7000:6ED5 call _uart_senddata
7000:6EDA pop cx
7000:6EDB pop cx
#usbhost#1126: g_OHCIAttach = 0;
7000:6EDC mov byte ptr [_g_ohciattach],0x00
#usbhost#1127: OHCI_DeviceAttach_Init = FALSE;
7000:6EE1 mov word ptr [_ohci_deviceattach_init],0x0000
#usbhost#1128: HighSpeed_Owner = TRUE;
7000:6EE7 mov word ptr [_highspeed_owner],0x0001
#usbhost#1131: DWordWrite(&ohci_regs->portstatus1, RH_PS_CSC);
7000:6EED mov ax,0x0001
7000:6EF0 xor dx,dx
7000:6EF2 push ax
7000:6EF3 push dx
7000:6EF4 mov ax,[_ohci_regs]
7000:6EF7 add ax,0x0054
7000:6EFA push [0x126c]
7000:6EFE push ax
7000:6EFF call _dwordwrite
7000:6F04 add sp,0x08
#usbhost#1137: DWordWrite(&ohci_regs->intrstatus, ints);
7000:6F07 push [bp-0x02]
7000:6F0A push [ints]
7000:6F0D mov ax,[_ohci_regs]
7000:6F10 add ax,0x000c
7000:6F13 push [0x126c]
7000:6F17 push ax
7000:6F18 call _dwordwrite
7000:6F1D add sp,0x08
#usbhost#1142: pci_int_status = InPortD(dec_info.io_base+CR5_ADDR);
7000:6F20 mov ax,0x007a
7000:6F23 mov es,ax
7000:6F25 mov ax, es:[0x0030]
7000:6F29 add ax,0x0028
7000:6F2C push ax
7000:6F2D call _inportd
7000:6F32 pop cx
7000:6F33 mov [bp-0x10],dx
7000:6F36 mov [pci_int_status],ax
#usbhost#1143: OutPortD(dec_info.io_base+CR5_ADDR, pci_int_status);
7000:6F39 push [bp-0x10]
7000:6F3C push [pci_int_status]
7000:6F3F mov ax,0x007a
7000:6F42 mov es,ax
7000:6F44 mov ax, es:[0x0030]
7000:6F48 add ax,0x0028
7000:6F4B push ax
7000:6F4C call _outportd
7000:6F51 add sp,0x06
#usbhost#1144: if ((uint16)pci_int_status & 0x0001) pci_tx_handler((DEC_STRU far *)&dec_info);
7000:6F54 test [pci_int_status],0x0001
7000:6F59 jz #usbhost#1145
7000:6F5B mov ax,0x007a
7000:6F5E push ax
7000:6F5F mov ax,0x0000
7000:6F62 push ax
7000:6F63 call _pci_tx_handler
7000:6F68 pop cx
7000:6F69 pop cx
#usbhost#1145: if ((uint16)pci_int_status & 0x0040) pci_rx_handler((DEC_STRU far *)&dec_info);
7000:6F6A test [pci_int_status],0x0040
7000:6F6F jz #usbhost#1148
7000:6F71 mov ax,0x007a
7000:6F74 push ax
7000:6F75 mov ax,0x0000
7000:6F78 push ax
7000:6F79 call _pci_rx_handler
7000:6F7E pop cx
7000:6F7F pop cx
#usbhost#1148: outp(INT_EOI,INTB_TYPE); // ;;write to EOI
7000:6F80 mov dx,0xff22
7000:6F83 mov al,0x16
7053:1C85 out dx,al
#usbhost#1149: }
7053:1C86 mov sp,bp
7053:1C88 pop es
7053:1C89 pop ds
7053:1C8A pop di
7053:1C8B pop si
7053:1C8C pop bp
7053:1C8D pop bx
7053:1C8E pop bx
7053:1C8F pop dx
7053:1C90 pop cx
7053:1C91 pop ax
7053:1C92 iret
_uartisr: void _interrupt UartIsr()
7053:1C93 push ax
7053:1C94 push cx
7053:1C95 push dx
_ohci_isr: void _interrupt OHCI_Isr()
7000:68DA push ax
7000:68DB push cx
7000:68DC push dx
7000:68DD push bx
7000:68DE push sp
7000:68DF push bp
7000:68E0 push si
7000:68E1 push di
7000:68E2 push ds
7000:68E3 push es
7000:68E4 mov bp,0x0004
7000:68E7 mov ds,bp
7000:68E9 mov bp,sp
7000:68EB sub sp,0x0082
7000:68EF cld
#usbhost#950: char buf1[28]={"High Speed device attach..."};
7000:68F0 lea ax,[buf1]
7000:68F3 push ss
7000:68F4 push ax
7000:68F5 mov ax,0x042a
7000:68F8 push ds
7000:68F9 push ax
7000:68FA mov cx,0x001c
7000:68FD call scopy@
#usbhost#951: char buf2[28]={"High Speed device detach..."};
7000:6902 lea ax,[buf2]
7000:6905 push ss
7000:6906 push ax
7000:6907 mov ax,0x0446
7000:690A push ds
7000:690B push ax
7000:690C mov cx,0x001c
7000:690F call scopy@
#usbhost#952: char buf3[28]={"Full Speed device attach..."};
7000:6914 lea ax,[buf3]
7000:6917 push ss
7000:6918 push ax
7000:6919 mov ax,0x0462
7000:691C push ds
7000:691D push ax
7000:691E mov cx,0x001c
7000:6921 call scopy@
#usbhost#953: char buf4[28]={"Full Speed device detach..."};
7000:6926 lea ax,[buf4]
7000:692A push ss
7000:692B push ax
7000:692C mov ax,0x047e
7000:692F push ds
7000:6930 push ax
7000:6931 mov cx,0x001c
7000:6934 call scopy@
#usbhost#958: ints=inport(INT_INSERV); //read in-service register
7000:6939 mov dx,0xff2c
7000:693C in ax,dx
7000:693D mov word ptr [bp-0x02],0x0000
7000:6942 mov [ints],ax
#usbhost#961: if(HighSpeed_Owner == TRUE){
7000:6945 cmp word ptr [_highspeed_owner],0x01
7000:694A jz #usbhost#963
7000:694C jmp #usbhost#1047
#usbhost#963: ints = DWordRead(&ehci_regs->status);
7000:694F mov ax,[_ehci_regs]
7000:6952 add ax,0x0004
7000:6955 push [0x0fca]
7000:6959 push ax
7000:695A call _dwordread
7000:695F pop cx
7000:6960 pop cx
7000:6961 mov [bp-0x02],dx
7000:6964 mov [ints],ax
#usbhost#965: if (ints == ~(u32)0)
7000:6967 cmp word ptr [bp-0x02],-0x01
7000:696B jnz #usbhost#968
7000:696D cmp [ints],-0x01
7000:6971 jnz #usbhost#968
#usbhost#966: goto Exit_INTA_ISR;
7000:6973 jmp #usbhost#1142
#usbhost#968: if (ints & STS_FLR) {
7000:6976 test [ints],0x0008
7000:697B jz #usbhost#971
#usbhost#969: DWordWrite(&ehci_regs->status, STS_FLR);
7000:697D xor ax,ax
7000:697F mov dx,0x0008
7000:6982 push ax
7000:6983 push dx
7000:6984 mov ax,[_ehci_regs]
7000:6987 add ax,0x0004
7000:698A push [0x0fca]
7000:698E push ax
7000:698F call _dwordwrite
7000:6994 add sp,0x08
#usbhost#971: if (ints & STS_PCD) { //Port change detect
7000:6997 test [ints],0x0004
7000:699C jnz #usbhost#973
7000:699E jmp #usbhost#1029
#usbhost#973: rhpt1s = DWordRead(&ehci_regs->port_status[0]);
7000:69A1 mov ax,[_ehci_regs]
7000:69A4 add ax,0x0044
7000:69A7 push [0x0fca]
7000:69AB push ax
7000:69AC call _dwordread
7000:69B1 pop cx
7000:69B2 pop cx
7000:69B3 mov [bp-0x0a],dx
7000:69B6 mov [rhpt1s],ax
#usbhost#981: if(rhpt1s & PORT_CSC) //Connect status change
7000:69B9 test [rhpt1s],0x0002
7000:69BE jz #usbhost#983
#usbhost#982: DWordWrite(&ehci_regs->port_status[0], (EHCI_PORT_INIT|PORT_CSC));
7000:69C0 mov ax,0x0070
7000:69C3 mov dx,0x1002
7000:69C6 push ax
7000:69C7 push dx
7000:69C8 mov ax,[_ehci_regs]
7000:69CB add ax,0x0044
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -