1. I need help to convert my old inline asm to djgpp inline asm.
I'am making my own 2d game kit and I need help to convert my inline asm
over.. here is the code I need to be convert over.
unsigned int Joystick(unsigned char stick)
// reads the joystick values manually by conting how long the capacitors
// to charge/discharge
// let's use the inline assembler. It's Cool!
cli ; disable interupts
mov ah, byte ptr stick ; get mask into ah to selct joystick to read
xor al,al ; zero out al, xor is a trick
xor cx,cx ; same with cx which we will use as a counter
mov dx,JOYPORT ; dx is used by inp and outp
out dx,al ; write 0's to the port
in al,dx ; read the data back from port
test al,ah ; has the bit in question changed?
loopne discharge ; if the stick isn't ready then --cx and loop
sti ; re-enable interrupts
xor ax,ax ; zero out ax
sub ax,cx ; ax now holds the position of the axis switch
} // end asm
// since ax has the result the function will return it properly
i just been with djgpp for 3 days now.. Trying to convert my inline asm
PS I'am not using allegro.. I'am making my own 2d game kit..
2. ISDN won't disconnect
3. Help with extended inline asm (or I'm stupid)
4. Can you Help Me? - PCI MIDI Interface
5. #define inline asm macros, inline asm labels
6. Java Developer -- Baltimore, MD -- 6+ Month of Contract
7. extended inline asm with djgpp
8. How to remove this as
9. problem with extended inline asm
10. Extended Inline Assembly Help
11. Inline asm Mode 13h help
12. I need help to convert my inline asm over to djgpp
13. can you help make THIS DJGPP inline asm work...