Synchronize Time with your NADS: Difference between revisions

From Bitchin100 DocGarden
Jump to navigationJump to search
No edit summary
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 2: Line 2:


Note, you will have to set the DAY$ separately since this code doesn't do that calculation.
Note, you will have to set the DAY$ separately since this code doesn't do that calculation.
== Model 100/102/200 ==


The program appears below, formatted for easy type-in on the TRS-80 Model 100 or Tandy 102.
The program appears below, formatted for easy type-in on the TRS-80 Model 100 or Tandy 102.
Line 13: Line 15:
MID$(A,LEN(A)-8,8)
MID$(A,LEN(A)-8,8)
2 INPUT#2,A:MID$(A,1)="0":L=LEN(A)-9:DAT
2 INPUT#2,A:MID$(A,1)="0":L=LEN(A)-9:DAT
E$=MID$(A,L,2)+"/"+MID$(A,3+L,2)+"/"_RIG
E$=MID$(A,L,2)+"/"+MID$(A,3+L,2)+"/"+RIG
HT$(A,2)
HT$(A,2)
</pre>
</pre>
Note: this program is formatted as it would look on your Model T at 40 characters-per-line, as you type it in from the BASIC prompt. From the main menu, launch BASIC. Observe that each program line starts with a number. There are two lines of code.
As you type each line, hit enter at the end of each line of code, not the end of each 40 columns.
This is how programs were formatted for type-in in hobbyist magazines.
== NEC 8201A and NEC 8300 ==
Adapted by Gary Weber
<pre>
1 MAXFILES=2:DEFSTRA-F:F="COM:9N81XN":OPENFFOROUTPUTAS1:OPENFFORINPUTAS2:E=CHR$(5):C=CHR$(13):PRINT#1,E;"time";C;E;"date";C;:INPUT#2,A:A=STR$(VAL(A)+(RIGHT$(A,1)="p"AND12))+RIGHT$(A,7):A="0"+RIGHT$(A,LEN(A)-1):TIME$=MID$(A,LEN(A)-8,8)
2 INPUT#2,A:A="0"+RIGHT$(A,LEN(A)-1):L=LEN(A)-9:DATE$=RIGHT$(A,2)+"/"+MID$(A,L,2)+"/"+MID$(A,3+L,2)
</pre>
[[Category:NADSBox]]

Latest revision as of 07:30, 30 May 2009

This program will synchronize your time and date with NADSBox.

Note, you will have to set the DAY$ separately since this code doesn't do that calculation.

Model 100/102/200

The program appears below, formatted for easy type-in on the TRS-80 Model 100 or Tandy 102.

1 MAXFILES=2:DEFSTRA-F:F="COM:98N1E":OPE
NFFOROUTPUTAS1:OPENFFORINPUTAS2:E=CHR$(5
):C=CHR$(13):?#1,E;"time";C;E;"date";C;:
INPUT#2,A:A=STR$(VAL(A)+(RIGHT$(A,1)="p"
AND12))+RIGHT$(A,7):MID$(A,1)="0":TIME$=
MID$(A,LEN(A)-8,8)
2 INPUT#2,A:MID$(A,1)="0":L=LEN(A)-9:DAT
E$=MID$(A,L,2)+"/"+MID$(A,3+L,2)+"/"+RIG
HT$(A,2)

Note: this program is formatted as it would look on your Model T at 40 characters-per-line, as you type it in from the BASIC prompt. From the main menu, launch BASIC. Observe that each program line starts with a number. There are two lines of code.

As you type each line, hit enter at the end of each line of code, not the end of each 40 columns.

This is how programs were formatted for type-in in hobbyist magazines.

NEC 8201A and NEC 8300

Adapted by Gary Weber

1 MAXFILES=2:DEFSTRA-F:F="COM:9N81XN":OPENFFOROUTPUTAS1:OPENFFORINPUTAS2:E=CHR$(5):C=CHR$(13):PRINT#1,E;"time";C;E;"date";C;:INPUT#2,A:A=STR$(VAL(A)+(RIGHT$(A,1)="p"AND12))+RIGHT$(A,7):A="0"+RIGHT$(A,LEN(A)-1):TIME$=MID$(A,LEN(A)-8,8)
2 INPUT#2,A:A="0"+RIGHT$(A,LEN(A)-1):L=LEN(A)-9:DATE$=RIGHT$(A,2)+"/"+MID$(A,L,2)+"/"+MID$(A,3+L,2)