Hi,
TRS-80 Model 100
I'm trying to send the program data out the serial port. The program
runs with lines like; 130 PRINT TAB(A);
but fails with 130 PRINT #1 TAB(A);
How to fix the program so data does go out the serial port?
10 OPEN "COM:88NE1" FOR OUTPUT AS 1
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 80 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT #1 TAB(A);
140 IF B=1 THEN 180
150 PRINT #1 " *"
160 B=1
170 GOTO 200
180 PRINT #1 " *"
190 B=0
200 IF INKEY$<>"" THEN GOTO 999
250 NEXT T
998 GOTO 50
999 END
On Monday, September 19, 2022 at 7:09:09 AM UTC-7, Bob Campbell wrote:
Walt Perko <r4r...@gmail.com> wrote:
Hi,Line 130 needs a comma. Should be:
TRS-80 Model 100
I'm trying to send the program data out the serial port. The program
runs with lines like; 130 PRINT TAB(A);
but fails with 130 PRINT #1 TAB(A);
How to fix the program so data does go out the serial port?
10 OPEN "COM:88NE1" FOR OUTPUT AS 1
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 80 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT #1 TAB(A);
140 IF B=1 THEN 180
150 PRINT #1 " *"
160 B=1
170 GOTO 200
180 PRINT #1 " *"
190 B=0
200 IF INKEY$<>"" THEN GOTO 999
250 NEXT T
998 GOTO 50
999 END
130 PRINT #1, TAB(A);
Otherwise, that is some ugly BASIC code. :-)
Hi,
Okay, adding the comma fixed the one error, but the output isn't actually tabbing out on the display ???
All the "*" are in a vertical line on the left side. They should be doing a series of "sinewaves" on the screen.
Walt Perko <r4r...@gmail.com> wrote:
Hi,
TRS-80 Model 100
I'm trying to send the program data out the serial port. The program
runs with lines like; 130 PRINT TAB(A);
but fails with 130 PRINT #1 TAB(A);
How to fix the program so data does go out the serial port?
10 OPEN "COM:88NE1" FOR OUTPUT AS 1
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 80 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT #1 TAB(A);
140 IF B=1 THEN 180
150 PRINT #1 " *"
160 B=1
170 GOTO 200
180 PRINT #1 " *"
190 B=0
200 IF INKEY$<>"" THEN GOTO 999
250 NEXT T
998 GOTO 50
999 END
Line 130 needs a comma. Should be:
130 PRINT #1, TAB(A);
Otherwise, that is some ugly BASIC code. :-)
Hi,
Okay, adding the comma fixed the one error, but the output isn't actually tabbing out on the display ???
All the "*" are in a vertical line on the left side. They should be
doing a series of "sinewaves" on the screen.
On 9/19/22 19:16, Walt Perko wrote:
On Monday, September 19, 2022 at 7:09:09 AM UTC-7, Bob Campbell wrote:
Walt Perko <r4r...@gmail.com> wrote:
Hi,Line 130 needs a comma. Should be:
TRS-80 Model 100
I'm trying to send the program data out the serial port. The program
runs with lines like; 130 PRINT TAB(A);
but fails with 130 PRINT #1 TAB(A);
How to fix the program so data does go out the serial port?
10 OPEN "COM:88NE1" FOR OUTPUT AS 1
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 80 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT #1 TAB(A);
140 IF B=1 THEN 180
150 PRINT #1 " *"
160 B=1
170 GOTO 200
180 PRINT #1 " *"
190 B=0
200 IF INKEY$<>"" THEN GOTO 999
250 NEXT T
998 GOTO 50
999 END
130 PRINT #1, TAB(A);
Otherwise, that is some ugly BASIC code. :-)
Hi,
Okay, adding the comma fixed the one error, but the output isn't
actually tabbing out on the display ???
All the "*" are in a vertical line on the left side. They should be
doing a series of "sinewaves" on the screen.
Your program lacks the ; after the PRINT command that suppresses
the new line.
bill
Ah yes. Lines 150 and 180.
On Monday, September 19, 2022 at 5:31:47 PM UTC-7, Bob Campbell wrote:
Ah yes. Lines 150 and 180.
Okay, I fixed line 150 and 180 ... but now the program just prints stars across the screen row after row ???
e.g., ********************************************************************************
********************************************************************************
********************************************************************************
I'm sending the output to the serial port which is connected to a
VersaTerm VT-100 emulator that connects to a VGA/LCD monitor.
When I run the program on my Altair-Duino Pro, on a VersaTerm, or ASCII Terminal or even in TeraTerm on my PC I see a sine wave.
10 OPEN "COM:88NE1" FOR OUTPUT AS 1
20 INPUT "Pause Time";P
40 REM arkable Program by David Ahl and modified by WKP SINEWKP.BAS
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 80 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT #1, TAB(A);
140 IF B=1 THEN 180
145 FOR PAUSE = 0 TO P:NEXT PAUSE
150 PRINT #1, " *";
160 B=1
170 GOTO 200
180 PRINT #1, " *";
190 B=0
200 IF INKEY$<>"" THEN GOTO 999
250 NEXT T
998 GOTO 50
999 END
Walt Perko <r4rguy@gmail.com> wrote:
On Monday, September 19, 2022 at 5:31:47 PM UTC-7, Bob Campbell wrote:
Ah yes. Lines 150 and 180.
Okay, I fixed line 150 and 180 ... but now the program just prints stars
across the screen row after row ???
e.g.,
********************************************************************************
********************************************************************************
********************************************************************************
I'm sending the output to the serial port which is connected to a
VersaTerm VT-100 emulator that connects to a VGA/LCD monitor.
When I run the program on my Altair-Duino Pro, on a VersaTerm, or ASCII
Terminal or even in TeraTerm on my PC I see a sine wave.
10 OPEN "COM:88NE1" FOR OUTPUT AS 1
20 INPUT "Pause Time";P
40 REM arkable Program by David Ahl and modified by WKP SINEWKP.BAS
50 B=0
100 REM START LONG LOOP
110 FOR T=0 TO 80 STEP .25
120 A=INT(26+25*SIN(T))
130 PRINT #1, TAB(A);
140 IF B=1 THEN 180
145 FOR PAUSE = 0 TO P:NEXT PAUSE
150 PRINT #1, " *";
160 B=1
170 GOTO 200
180 PRINT #1, " *";
190 B=0
200 IF INKEY$<>"" THEN GOTO 999
250 NEXT T
998 GOTO 50
999 END
This will not work with PRINT #1 going out the serial port. OPEN FOR
OUTPUT AS 1 means you are creating a text file. There is no cursor to position.
All you can send is plain text. PRINT TAB (A) is for positioning the
cursor on the screen. There is no cursor to position in a text file.
The best you can do is just PRINT #1 formatted lines of text. Like this:
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
And on and on. To print any pattern you want. Not very elegant, but that is how all “graphics” were printed out way back when, on computers that had
no graphics capabilities.
The program you are using is designed to run on a screen. Not to create a text file.
Bob Campbell <nu...@none.none> wrote:
Walt Perko <r4r...@gmail.com> wrote:
On Monday, September 19, 2022 at 5:31:47 PM UTC-7, Bob Campbell wrote:The program you are using is designed to run on a screen. Not to create a text file.
Yeah, I knew the above would not come out correctly. It was a large V originally.
But you still get the idea.
On Tuesday, September 20, 2022 at 7:42:19 PM UTC-7, Bob Campbell wrote:
Bob Campbell <nu...@none.none> wrote:
Walt Perko <r4r...@gmail.com> wrote:Yeah, I knew the above would not come out correctly. It was a large V
On Monday, September 19, 2022 at 5:31:47 PM UTC-7, Bob Campbell wrote: >>>>The program you are using is designed to run on a screen. Not to create a >>> text file.
originally.
But you still get the idea.
On the Model 100 screen I can see the sine wave moving up the screen as
the program runs, on my Altair computer the program does a reasonable sinewave on the terminal screen attached via serial port to the Altair console.
That is why I'm expecting the program to create a sine wave on the
terminal screen attached to the serial port of the Model 100.
So the "TAB" feature in Model 100 TRS-80 basic doesn't send a series of spaces like Microsoft BASIC-80?
Walt Perko <r4r...@gmail.com> wrote:
So the "TAB" feature in Model 100 TRS-80 basic doesn't send a series of spaces like Microsoft BASIC-80?Not when going out the serial port using OPEN FOR OUTPUT AS 1. That is a text file. Again, there is no cursor to position in a text file.
You can try PRINT #1, SPACE$(A);”*”;
SPACE$(X) creates X number of spaces.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 70:32:58 |
Calls: | 6,712 |
Files: | 12,244 |
Messages: | 5,356,842 |