Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline Doobrey

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: Sending one byte to the parallel port
« Reply #14 from previous page: 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 motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Sending one byte to the parallel port
« Reply #15 on: May 23, 2006, 09:58:16 PM »
Now that's more like it - Basic should be much easier :-) I assume I can compile with this?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Doobrey

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

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Sending one byte to the parallel port
« Reply #17 on: May 23, 2006, 10:21:55 PM »
Cool, gonna try it tomorrow :-) Can I just paste the code you gave me in to Blitz and execute it, or do I have to include stuff?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10