Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: Sending one byte to the parallel port
« on: May 23, 2006, 05:23:18 PM »
Want something reeeeeaaaaaally simple ?

Create a file only containing 1 byte (you may need a hex-editor to manipulate that byte), and then type:

copy myfile to par:

*clack* *clack*  :-D

Or if in C (untested but should work, and if with every compiler):

char c = 0xf3;
FILE *file;

file = fopen("PAR:","w");
putc(file,c);
fclose(file);

Done from memory, typos or under international copyright
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: Sending one byte to the parallel port
« Reply #1 on: May 23, 2006, 05:58:46 PM »
You'll need to atleast include stdio.h.

GCC is available for Amiga, you may need to google a bit.
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: Sending one byte to the parallel port
« Reply #2 on: May 23, 2006, 06:01:28 PM »
Oh, and about that other idea:

"echo "blabla" >par:" would also work (you may need to replace "blabla" with some escape-sequence in order to send unprintable bit-combination (and no I don't know the next best thing about escape-sequences).
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: Sending one byte to the parallel port
« Reply #3 on: May 23, 2006, 08:40:29 PM »
CRTL-C should do the trick.

You may also try a bigger file, if it just switches once the HW is missing some sort of handshake, if it goes to the end it's copy which doesn't return cleanly.

In that case you could try other commands (echo,type etc) which can also be used to send files to par:

BUT in I personaly send several times files to ser: that way without copy getting blocked (unless the receiving computer wasn't listening, in which case CTRL-C worked just fine).
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else
 

Offline Kronos

  • Resident blue troll
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4017
    • Show all replies
    • http://www.SteamDraw.de
Re: Sending one byte to the parallel port
« Reply #4 on: May 23, 2006, 09:40:52 PM »
@motorollin
Have yout tried  this  ?


Mom and Dad, I love you, please sell me to Paris Hilton.
-Kronos  ;-)
1. Make an announcment.
2. Wait a while.
3. Check if it can actually be done.
4. Wait for someone else to do it.
5. Start working on it while giving out hillarious progress-reports.
6. Deny that you have ever announced it
7. Blame someone else