ASM question
ASM question
Hi all,
how can i use the IN and OUT asm commands within PB ?
(Example)
Procedure ATA_IDENTIFY_DRIVE()
MOV DX, 1F7h
IN AL,DX
EndProcedure
(IN AL,DX is reported as illegal instruction !!
Any idea how to address the IDE controller directly ?)
how can i use the IN and OUT asm commands within PB ?
(Example)
Procedure ATA_IDENTIFY_DRIVE()
MOV DX, 1F7h
IN AL,DX
EndProcedure
(IN AL,DX is reported as illegal instruction !!
Any idea how to address the IDE controller directly ?)
-
VPureBasic
- User

- Posts: 59
- Joined: Fri Apr 25, 2003 6:09 pm
- Location: Quebec - Canada
Hi VPureBasic
i don't think it's the problem here !
found on the Net :
...
In x86 assembler you use in( ) and out( ) instructions. They move single bytes. There is also inw( ) and outw( ) for moving 16 bit words
The format of the instructions are <instruction name> ( target, source ) Target and source are a port address or data
NOTE: For port addresses below 0x100h you can directly use the port address as a number.
For port addresses above 0xffh you have to load the address into the DX register
Examples:
mov dx, 379h
in al, dx (Reads port 0x379h -LPT1 status register- into al register)
...
i don't think it's the problem here !
found on the Net :
...
In x86 assembler you use in( ) and out( ) instructions. They move single bytes. There is also inw( ) and outw( ) for moving 16 bit words
The format of the instructions are <instruction name> ( target, source ) Target and source are a port address or data
NOTE: For port addresses below 0x100h you can directly use the port address as a number.
For port addresses above 0xffh you have to load the address into the DX register
Examples:
mov dx, 379h
in al, dx (Reads port 0x379h -LPT1 status register- into al register)
...
Have you tried to pass it directly to FASM by using the '!' operator, like this:
Code: Select all
! mov dx, 1f7h
! in al, dx
-
dell_jockey
- Enthusiast

- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
-
dell_jockey
- Enthusiast

- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
Check out http://www.purearea.net/ and search for "IO_DLL_WRAPPER".
