• Please review our updated Terms and Rules here

Small questions for the Model 4:

clh333

Veteran Member
Joined
Feb 22, 2015
Messages
1,443
Location
Cleveland, OH, USA
In transferring files from a Win10 machine to the M4 via a serial connection (9600 / 8N1 / RTS CTS DSR = ON, CD RI = OFF) I am reliably transferring one file at a time using XMODEM. Attempts to use YMODEM for batch transfer have thus far failed. (Receiver reports missing header on file save) Attempts to locate a ZMODEM-based utility have also failed. What might I be missing?

Overcome by the inexplicable urge to program in BASIC I started developing a Morse Code translator that could read ASCII input and output Morse. Having accomplished character translation ("A" => ".-") I turned my attention to outputting equivalent tones. LS-DOS 6.x BASIC has a SOUND function but the tone, duration and interval are all pretty far off the mark. I thought about a ML subroutine to drive the speaker (port 0FFH) with alternating 0s and 1s ("bit-banging"?) but the routines I have shamelessly copied from texts are all mysteriously silent. What might I be missing?

Reading the Misosys Basic manual is better than not having a manual for reference, but there seem to be some omissions of useful facts. For example I couldn't find a listing of operators or their order of precedence. What might I be missing? And does anyone know where a copy of their Basic compiler is to be found?

No biggie, but thanks for your suggestions.

-CH-
 
Port $FF is the cassette so you'd need to hook up the cassette audio output to a speaker to get sound.

The BASIC routines must be using the built-in speaker which is controlled via bit 0 of port $90 (with mirrors at ($91, $92, $93).

Unless the cassette audio routines are super fancy and use all 3 levels of output possible it should be easy to adapt the routines to the built-in speaker.
 
C, question before I would really be able to answer.

You say Misosys BASIC manual. And your still talking about BASIC supplied with TRSDOS 6.x.x? You do not have big brown manual that came with machine and BASIC section copyright Radio Shack/Tandy?

Maybe part of your manual is missing but precedence should be in there. Basically right to left. * / first then + -. Can force any sequence by using (). Pretty much Dartmouth standard. I think I have precedence right, its been awhile since I had to think it out. To make code more readable and clear its best to use () and then we all know. BASIC as I recall is same as FORTRAN and most others.

And yes BASIC does have a function for placing small machine code bytes in a string or array then calling that variable.

Neat stuff.
 
I have shamelessly copied from texts are all mysteriously silent. What might I be missing? -CH-

TRS-80 makes sound thru the cassette port (5 pin din out the back) you can connect an amplified speaker to 2 pins of the 5 pin to get sound out , OR connect a cassette player and press play.. :)
 
Thanks to all for your responses.

DanielBooneAmerica, I am using LS-DOS 6.3.1 (thanks to tim-mann.org for all the resources) and my manual is a PDF file. The particular problem that confronted me was controlling printout in a FOR-NEXT loop: "If X MOD 4 = 0 then PRINT". Some languages use X MOD Y, some use X \ Y, some use MOD(X,Y); having a manual at hand I figured I would look it up, but it wasn't in the index under "Operator precedence" or "Precedence of operators", and in the list of BASIC statements, beginning on P. 290, MOD doesn't appear.

Patrick, I have tried two versions of the code, one pointing to the cassette port and one to the sound card (0FFH and 90H respectively). Neither makes any noise, even with a cassette player plugged into the cassette port and PLAY pressed. My guess is that there is another register that needs to be addressed to "enable" output. The LS-DOS manual makes note of "system services" which seem to equate to BIOS functions in the CP/M and MS-DOS world. @SOUND (104) can be called from an assembly routine, but the setup requires loading values for both tone (frequency) and duration. It's a canned routine, in other words, and not direct access to the port; what's in the routine I can only guess. The Technical Service Manual (Tandy, '83) on pp 21-22 describes the sound card "option" and shows Q1 driving the transducer on the not-Q output of an LS74 IC, an edge-triggered flip-flop. Pin 1 (Clear) is held high, Pin 2 is clocked and Pin 3 is the data value, alternately 0 or 1, that gets output on Pin 6, not-Q, and drives the 2N3906 transistor.

-CH-
 
Check that the sound routines are changing bit 0 of port $90. The original routines may not be flipping the lower bit.

If you want to verify that port $90 is correct run this BASIC code and confirm it makes a noise:

Code:
10 OUT 144,0:OUT 144,1:GOTO 10
 
Back
Top