• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Activating SSC via assembly - help needed

Dog Cow

68020
Hi,

I'm using the built-in SSC emulation in my GS and have it connected by serial port to a Classic running ClarisWork's communications module. Everything is perfectly fine: I can send text to the Classic and the Classic can control the GS. Everything works.

What I want to know:

I spent about 2 hours last night poring over the SSC manual and the Apple II Reference manual looking for how to activate the SSC and send/receive data using Assembly language comnmands. That is, I don't want to have to type PR#2, Control-A and all of the rest.

I found via the A2 Ref Man that the Apple's output routine is located at $36 (lowbyte) and $37 (high-byte) and the input routine is at $38 and $39. These will normally be 1BFD for KEYIN and EDFD for the standard COUT monitor routine.

Since the emulated SSC is in slot 2, its input routine is at $C205 and its output is at $C207. All I have to do is poke these values into the locations mentioned above. I wrote a BASIC program to do a POKE 56, 05 and POKE 57, 194 but it is still not working! I look in the Monitor and I see a 05C3 instead of 05C2. Every time I try this, I cannot get characters typed on the Classic to transmit, but if I use pr#2, then it does put the right values in and text typed on the Classic appears on the GS screen.

Anyone know what is going wrong? I think I'm leaving out a step.

 
If you want to avoid the work of programming the SCC (Serial Communications Controller) in your IIgs directly, you want to use the Pascal entry points in the firmware. The SCC is compatible with the SSC (Super Serial Card) at the firmware level only. They are completely different pieces of hardware.

But you've got the right idea already: you load up command strings and knock on the entry points to do things like set the baud rate. As for PR#2, I suppose a simple JSR $C200 would do the job. Check your references for "Apple Pascal 1.1 Entry Points" or so. I have some ADT source code from Joseph Oswald that implements Pascal entry points to do the things that normally happens at the hardware level so it could be made compatible with the IIgs SCC. Send me a PM if you'd like to take a look at that.

 
Thanks for the JSR. I was looking through more manuals, trying to figure out exactly what a PR#2 did. The page with the Pascal 1.1 entry points was right across from the page with BASIC and monitor entry points, but I looked at those instead of it.

I suppose I should give you more information. I'm only using a IIgs becuase that's all I have. I don't have a SSC for my //e yet. I want to use the Super Serial card to write a network game as described in this topic.

The game would be written in Applesoft, but would jump into some Assembly language routines to handle sending and receiving of network data. I'd like to make this game compatible with any Apple that can use (or emulate) an SSC.

 
Back
Top