Welcome, Guest. Please login or register.

Author Topic: Sending one byte to the parallel port  (Read 4321 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Doobrey

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show all replies
    • http://www.doobreynet.co.uk
Re: Sending one byte to the parallel port
« on: May 23, 2006, 09:54:20 PM »
Quote

motorollin wrote:
 Unfortunately I have no experience in C or ASM, though I learn languages quickly. Guess I'll have to give it a try :-)


AmiBlitz to the rescue  ;-)

 ;-- Parallel port Blitz example..
 ;-- No more stupid Poking/peeking...
 ;-- remember to use all.res !
NEWTYPE .byte
 b.b
End NEWTYPE

*PPort_Dir.byte  = $BFE301
*PPort_Bits.byte = $BFE101

If AllocMiscResource_(#MR_PARALLELPORT,"MyAppName") = 0

  *PPort_Dir\b= %11111111   ; set all bits direction to output

  ;-- Ready to rock and roll..

  *PPort_Bits\b=%01010101   ; set the little buggers

  FreeMiscResource_ #MR_PARALLELPORT
Else
  NPrint "Crap, somethings already got the port :("
EndIf

End
On schedule, and suing
 

Offline Doobrey

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show all replies
    • http://www.doobreynet.co.uk
Re: Sending one byte to the parallel port
« Reply #1 on: May 23, 2006, 10:11:29 PM »
AFAIK, the latest complete archives are at amiforce.de
On schedule, and suing