Basic program question [message #377974] |
Tue, 11 December 2018 02:51 |
|
Originally posted by: 6502enhanced
Question towards Basic programming:
I want to set an output to more than one Slot - how do I have to write that in a basic program?
If the output is set normally to the monitor with PR#0 and I want to set it ALSO to my DoubleTalk card - how do I have to write it?
So far the line reads: "410 Print D$"PR#0"
Now I want to ADD Slot 7 - how would the line then have to be?
Thanks
|
|
|
Re: Basic program question [message #377990 is a reply to message #377974] |
Tue, 11 December 2018 05:28 |
|
Originally posted by: Brian Patrie
On 11/12/2018 01.51, 6502enhanced@gmail.com wrote:
> Question towards Basic programming:
> I want to set an output to more than one Slot - how do I have to
> write that in a basic program?
> If the output is set normally to the monitor with PR#0 and I want
> to set it ALSO to my DoubleTalk card - how do I have to write it?
> So far the line reads: "410 Print D$"PR#0"
> Now I want to ADD Slot 7 - how would the line then have to be?
> Thanks
You can't set output to more than one slot at a time.
You would have to do your output multiple times--one for each slot.
Many serial and parallel cards do, however, have the ability to
duplicate output to the screen. The DoubleTalk may, also. If the card
doesn't do it by default, there is probably a command you can PRINT to
it to enable it.
410 OUT$="Hello, world."
420 PRINT D$"PR#0" : PRINT OUT$
430 PRINT D$"PR#7" : PRINT OUT$
(This becomes complicated with the 80-column screen, as PR#3 will cause
the screen to be cleared.)
|
|
|
|
Re: Basic program question [message #378065 is a reply to message #377974] |
Tue, 11 December 2018 20:23 |
|
Originally posted by: jbrooks
On Monday, December 10, 2018 at 11:51:31 PM UTC-8, 6502en...@gmail.com wrote:
> Question towards Basic programming:
> I want to set an output to more than one Slot - how do I have to write that in a basic program?
> If the output is set normally to the monitor with PR#0 and I want to set it ALSO to my DoubleTalk card - how do I have to write it?
> So far the line reads: "410 Print D$"PR#0"
> Now I want to ADD Slot 7 - how would the line then have to be?
> Thanks
Here's a technique which uses a ProDOS COUT driver to send chars to two devices, assuming they use the standard $Cs07 entry point (a bit hacky):
]list
10 DATA 216,32,7,,76,7
20 S1 = 3:S2 = 3:D$ = CHR$ (4)
30 FOR A = 768 TO 773: READ B: POKE A,B: NEXT
40 POKE 771,192 + S1: POKE 774,192 + S2
50 PRINT D$"PR#"S2
60 PRINT D$"PR#"S1
70 PRINT D$"PR#A$300"
]run
]]??ss11,,ss22
33 33
Just change the S1 & S2 vars in line 20 to the slots of two card ROMs you want to output to.
For pr#0, you'll need to change the driver so one of the calls goes to $FDF0.
-JB
@JBrooksBSI
|
|
|