summaryrefslogtreecommitdiff
path: root/src/heretic/i_ibm_a.asm
diff options
context:
space:
mode:
authorSimon Howard2008-09-04 23:22:39 +0000
committerSimon Howard2008-09-04 23:22:39 +0000
commit0774dce204c2c01622c59819e2a29590a1b50e46 (patch)
tree214f8b6e440d8d09ead9909f4c42f842404f6c41 /src/heretic/i_ibm_a.asm
parent0df2cb80cf03d7259746834220d209b306a8c503 (diff)
downloadchocolate-doom-0774dce204c2c01622c59819e2a29590a1b50e46.tar.gz
chocolate-doom-0774dce204c2c01622c59819e2a29590a1b50e46.tar.bz2
chocolate-doom-0774dce204c2c01622c59819e2a29590a1b50e46.zip
Remove unused files.
Subversion-branch: /branches/raven-branch Subversion-revision: 1196
Diffstat (limited to 'src/heretic/i_ibm_a.asm')
-rw-r--r--src/heretic/i_ibm_a.asm135
1 files changed, 0 insertions, 135 deletions
diff --git a/src/heretic/i_ibm_a.asm b/src/heretic/i_ibm_a.asm
deleted file mode 100644
index 06e5a9df..00000000
--- a/src/heretic/i_ibm_a.asm
+++ /dev/null
@@ -1,135 +0,0 @@
- .386
- .MODEL small
-
-.DATA
-
-
-
-.CODE
-
-IF 0
-#define PEL_WRITE_ADR 0x3c8
-#define PEL_READ_ADR 0x3c7
-#define PEL_DATA 0x3c9
-ENDIF
-
-;================
-;
-; I_DivException
-;
-;================
-
-PROC I_DivException_
-PUBLIC I_DivException_
- mov edx,03c9h
- mov al,63
- out dx,al
-
- mov ebx,0ffffffh
- mov eax,[ebx]
- retf
-ENDP
-
-;================
-;
-; I_SetDivException
-;
-;================
-
-PROC I_SetDivException_
-PUBLIC I_SetDivException_
- pusha
-
- mov eax,0212h
- mov ebx,0
- mov ecx,cs
- mov edx,OFFSET I_DivException_
- int 31h
- jnc good
-
- popa
- mov eax,0
- ret
-
-good:
- popa
- mov eax,1
- ret
-
-ENDP
-
-
-;================
-;
-; I_ReadJoystick
-;
-; Read the absolute joystick values
-; returns false if not connected
-;================
-
-.data
-
-_joystickx dd 0
-_joysticky dd 0
-PUBLIC _joystickx, _joysticky
-
-.code
-
-PROC I_ReadJoystick_
-PUBLIC I_ReadJoystick_
- pusha
- pushf ; state of interrupt flag
- cli
-
- mov dx,0201h
- in al,dx
- out dx,al ; Clear the resistors
-
- mov ah,1 ; Get masks into registers
- mov ch,2
-
- xor esi,esi ; Clear count registers
- xor edi,edi
- xor ebx,ebx ; Clear high byte of bx for later
-
- mov ebp,10000 ; joystick is disconnected if value is this big
-
-jloop:
- in al,dx ; Get bits indicating whether all are finished
-
- dec ebp ; Check bounding register
- jz bad ; We have a silly value - abort
-
- mov bl,al ; Duplicate the bits
- and bl,ah ; Mask off useless bits (in [xb])
- add esi,ebx ; Possibly increment count register
- mov cl,bl ; Save for testing later
-
- mov bl,al
- and bl,ch ; [yb]
- add edi,ebx
-
- add cl,bl
- jnz jloop ; If both bits were 0, drop out
-
-done:
- mov [_joystickx],esi
- shr edi,1 ; because 2s were added
- mov [_joysticky],edi
-
- popf ; restore interrupt flag
- popa
- mov eax,1 ; read was ok
- ret
-
-bad:
- popf ; restore interrupt flag
- popa
- xor eax, eax ; read was bad
- ret
-
-ENDP
-
-
-END
-