I am new in purebasic programming. I wanted write assembler instructions to the 8042 keyboard controller. All the attempts failed because I think purebasic can not compile IN commands.
How can I integrate an IN command in purebasic for example for keyboard or soundcard reading?  
I included this example that generate an error for an Illegal instruction.
 
!_start:
	  !IN  al, $64			
	  !AND al, 2	;Test if command buffer is empty 
	  !JNZ _start					
	  !MOV al, dl
	  !OUT 60h, al	;Write 
    !_wa:
	  !IN  al, 64
	  !AND al, 2	;Test if command came through
	  !JNZ _wa
	  !MOV al, 0111b
	  !OUT 60h, al	;Set all LED's to ON.
End
Thankx Sebt
			
			
									
									
						doe anybody now why i get a "executing binary error&quo
You might want to look at this:
http://www.purebasic.fr/english/viewtop ... ight=winio
Or just search for "winio" on the forum..
			
			
									
									
						http://www.purebasic.fr/english/viewtop ... ight=winio
Or just search for "winio" on the forum..
Thanks for this answer that will keep me from trying!
It seems the XP blocks memory access based on the kind of program (Drivers/some-DLLs/some-EXEs programs are able to read/write data). So it seems the program has to have privileged administrations/user rights. Is there a purebasic program that can adjust file registrations ?
sebt
			
			
									
									
						It seems the XP blocks memory access based on the kind of program (Drivers/some-DLLs/some-EXEs programs are able to read/write data). So it seems the program has to have privileged administrations/user rights. Is there a purebasic program that can adjust file registrations ?
sebt
best approach is probably to access ports via a dedicated dll, there are some on the net, load up google and, well, start googling 
			
			
									
									( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
						( The path to enlightenment and the PureBasic Survival Guide right here... )
Every XP program runs in its very own private virtual address space. This is called protected mode. Do a google search for real mode and protected mode for more information.sebt wrote:Thanks for this answer that will keep me from trying!
It seems the XP blocks memory access based on the kind of program (Drivers/some-DLLs/some-EXEs programs are able to read/write data). So it seems the program has to have privileged administrations/user rights. Is there a purebasic program that can adjust file registrations ?
sebt



