Hallo Michał, > I am analyzing the code ... I found an old disassembler from 1988 and it produced this file: ; The following equates show data references outside the range of the program. int7seg equ 1Eh data_2e equ 0 ;* data_3e equ 4 ;* data_4e equ 6 ;* data_5e equ 8 ;* data_6e equ 9 ;* ;------------------------------------------------------------ seg_b ---- seg_b segment byte public assume cs:seg_b , ds:seg_b org 0F000h jmp rqst900 rqster push ax push bx push cx push dx push si push es push ds mov ax,0 mov ds,ax mov ax,ds:int7seg mov ds,ax mov al,cl and al,7Fh mov bl,6 mul bl ; ax = reg * al mov si,ax mov dx,[si+1Ah] loc_1: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_1 ; Jump if not zero or al,4 out 21h,al ; port 21h, 8259-1 int comands nop in al,21h ; port 21h, 8259-1 int IMR test al,8 jz loc_2 ; Jump if zero mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop jmp short loc_1 loc_2: mov al,0FFh out 23h,al ; port 23h ??I/O Non- standard mov al,cl out 20h,al ; port 20h, 8259-1 int command in al,21h ; port 21h, 8259-1 int IMR and al,0BFh out 21h,al ; port 21h, 8259-1 int comands nop nop nop or al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands loc_3: in al,21h ; port 21h, 8259-1 int IMR test al,8 jz loc_3 ; Jump if zero mov al,0 out 23h,al ; port 23h ??I/O Non- standard mov si,data_2e inc dl jmp short loc_6 db 90h loc_4: mov al,0FFh out 23h,al ; port 23h ??I/O Non- standard mov al,[si+0Ah] out 20h,al ; port 20h, 8259-1 int command mov al,44h ; 'D' out 21h,al ; port 21h, 8259-1 int comands nop loc_5: in al,21h ; port 21h, 8259-1 int IMR test al,8 jz loc_5 ; Jump if zero mov al,0 out 23h,al ; port 23h ??I/O Non- standard inc si loc_6: dec dl jz loc_8 ; Jump if zero mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop loc_7: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_7 ; Jump if not zero jmp short loc_4 loc_8: test cl,80h jz loc_10 ; Jump if zero lock nop lock mov al,0DFh lock out 22h,al ; port 22h ??I/O Non-standard lock nop lock nop lock nop lock or al,20h ; ' ' lock out 22h,al ; port 22h ??I/O Non-standard mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop loc_9: jmp short loc_9 loc_10: mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop loc_11: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_11 ; Jump if not zero mov si,data_2e inc dh jmp short loc_15 db 90h loc_12: mov al,44h ; 'D' out 21h,al ; port 21h, 8259-1 int comands nop loc_13: in al,21h ; port 21h, 8259-1 int IMR test al,8 jz loc_13 ; Jump if zero in al,20h ; port 20h, 8259-1 int IRR/ISR mov [si+0Ah],al mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop loc_14: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_14 ; Jump if not zero inc si loc_15: dec dh jnz loc_12 ; Jump if not zero loc_16: pop ds pop es pop si pop dx pop cx pop bx pop ax retf ; Return far rqst900: pop dx pop dx pop dx mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop pop si pop ds pop es pop dx pop cx pop bx pop ax pop ax pop ax popf ; Pop flags jmp short loc_16 loc_18: push ax push bx push cx push dx push es push ds push si mov ax,0 mov ds,ax mov ax,ds:int7seg mov ds,ax in al,20h ; port 20h, 8259-1 int IRR/ISR and al,7Fh mov bl,6 mul bl ; ax = reg * al mov si,ax mov cx,[si+1Ch] mov ds:data_3e,cx mov cx,[si+1Eh] mov ds:data_4e,cx mov dx,[si+1Ah] mov al,44h ; 'D' out 21h,al ; port 21h, 8259-1 int comands nop loc_19: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_19 ; Jump if not zero mov si,data_2e inc dl jmp short loc_23 db 90h loc_20: mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop loc_21: in al,21h ; port 21h, 8259-1 int IMR test al,8 jz loc_21 ; Jump if zero in al,20h ; port 20h, 8259-1 int IRR/ISR mov [si+0Ah],al mov al,44h ; 'D' out 21h,al ; port 21h, 8259-1 int comands nop loc_22: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_22 ; Jump if not zero inc si loc_23: dec dl jnz loc_20 ; Jump if not zero push dx push cs mov dl,61h ; 'a' mov dh,0F1h push dx int 7 ; ??INT Non-standard interrupt pop dx cmp dh,0 je loc_27 ; Jump if equal mov si,data_2e loc_24: mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop loc_25: in al,21h ; port 21h, 8259-1 int IMR test al,8 jz loc_25 ; Jump if zero mov al,0FFh out 23h,al ; port 23h ??I/O Non- standard mov al,[si+0Ah] out 20h,al ; port 20h, 8259-1 int command mov al,44h ; 'D' out 21h,al ; port 21h, 8259-1 int comands nop loc_26: in al,21h ; port 21h, 8259-1 int IMR test al,8 jnz loc_26 ; Jump if not zero mov al,0 out 23h,al ; port 23h ??I/O Non- standard inc si dec dh jnz loc_24 ; Jump if not zero loc_27: cli ; Disable interrupts mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands nop pop si pop ds pop es pop dx pop cx pop bx pop ax iret ; Interrupt return ;* No entry point to code retn ;* No entry point to code cli ; Disable interrupts mov sp,0F000h mov al,40h ; '@' out 21h,al ; port 21h, 8259-1 int comands mov al,0FFh out 20h,al ; port 20h, 8259-1 int command out 22h,al ; port 22h ??I/O Non- standard inc al out 23h,al ; port 23h ??I/O Non- standard mov al,44h ; 'D' out 24h,al ; port 24h ??I/O Non- standard mov al,20h ; ' ' out 25h,al ; port 25h ??I/O Non- standard lock nop lock mov al,0DFh lock out 22h,al ; port 22h ??I/O Non-standard lock nop lock nop lock nop lock or al,20h ; ' ' lock out 22h,al ; port 22h ??I/O Non-standard mov al,1Bh out 0,al ; port 0, DMA-1 bas&add ch 0 mov al,8 out 1,al ; port 1, DMA-1 bas&cnt ch 0 mov al,1 out 1,al ; port 1, DMA-1 bas&cnt ch 0 mov al,0FEh out 1,al ; port 1, DMA-1 bas&cnt ch 0 sti ; Enable interrupts loc_28: jmp short loc_28 ;* No entry point to code push ax push ds mov ax,0 mov ds,ax mov ax,ds:int7seg mov ds,ax mov al,20h ; ' ' out 0,al ; port 0, DMA-1 bas&add ch 0 in al,21h ; port 21h, 8259-1 int IMR test al,1 jz loc_29 ; Jump if zero in al,21h ; port 21h, 8259-1 int IMR test al,2 jz loc_31 ; Jump if zero loc_29: pop ds pop ax pop ax pop ax pop ax sti ; Enable interrupts lock nop lock mov al,0DFh lock out 22h,al ; port 22h ??I/O Non-standard lock nop lock nop lock nop lock or al,20h ; ' ' lock out 22h,al ; port 22h ??I/O Non-standard loc_30: jmp short loc_30 loc_31: mov al,0 out 22h,al ; port 22h ??I/O Non- standard mov al,0FFh xor al,ds:data_5e xor al,ds:data_6e jz loc_32 ; Jump if zero mov ax,0A55Ah mov ds:data_5e,al mov ds:data_6e,ah pop ds pop ax pop ax pop ax popf ; Pop flags int 7 ; ??INT Non-standard interrupt loc_32: pop ds pop ax jmp loc_18 db 193 dup (0) db 3311 dup (0FFh) db 0EAh,0A1h,0F1h, 00h,0F0h db 11 dup (0FFh) seg_a ends end Have fun! -- ___ / __|__ / / |_/ Groetjes, Ruud Baltissen \ \__|_\ \___| http://Ruud.C64.org Message was sent through the cbm-hackers mailing listReceived on 2011-01-17 18:00:12
Archive generated by hypermail 2.2.0.