doe anybody now why i get a "executing binary error&quo

Windows specific forum
sebt
New User
New User
Posts: 3
Joined: Wed Nov 02, 2005 6:21 pm

doe anybody now why i get a "executing binary error&quo

Post by sebt »

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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Windows XP does not allow direct hardware access, that's the problem.
KarLKoX
Enthusiast
Enthusiast
Posts: 681
Joined: Mon Oct 06, 2003 7:13 pm
Location: France
Contact:

Post by KarLKoX »

Great to know this, i was searching why my code crashes too :)
"Qui baise trop bouffe un poil." P. Desproges

http://karlkox.blogspot.com/
sebt
New User
New User
Posts: 3
Joined: Wed Nov 02, 2005 6:21 pm

Post by sebt »

Trond wrote:Windows XP does not allow direct hardware access, that's the problem.

Ok . I assume XP also blocks access to BIOS addresses?

sebt
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

You might want to look at this:
http://www.purebasic.fr/english/viewtop ... ight=winio

Or just search for "winio" on the forum..
sebt
New User
New User
Posts: 3
Joined: Wed Nov 02, 2005 6:21 pm

Post by sebt »

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
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

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... )
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

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
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.
Post Reply