Tandy 600 Programmer's Reference Manual page 202

Bios programmers
Hide thumbs Also See for 600:
Table of Contents

Advertisement

A
sample
conversion program,
Intel.
hex
to
binary.
The
intel.
hex
file
must have 16
byte records!
100
KEYOFF:CLS
200
PRINT:INPUT
"Intel.hex
file
name:
",HNAME$
300
PRINT:INPUT
"Binary
file
name:
",
BNAME$
400
OPEN HNAMES FOR
INPUT
AS
#1
500
OPEN BNAME$
FOR OUTPUT AS
#2
600
'
700
H$ =
"&H"
800
LINE
INPUT
#1,L$
900
PRINT
L$;"
>
"
1000
LS
= LEN
(L$)-11
1100
IF
LS
=
GOTO
5000
1200
L$
=
MID$(L$,10,LS)
1300
PRINT"
";L$
1
400
FOR
I
=
1
TO
LS
STEP
2
1500
B
=
VAL(H$ +
MID$(L$,I,2))
1600
PRINT
#2,CHR$(B);
1700
NEXT
I
1800
IF
LS<>0 GOTO
800
1900
'
5000
PRINT
"End
of Intel.hex
file"
5100
CLOSE
5200
END
196

Advertisement

Table of Contents
loading

Table of Contents