beautypg.com

Juniper Systems JS600 User Manual

Page 55

background image

Sending and Receiving Information Page 5-13

Transmitting Under Polycode Program Control

If Transmit Mode 2 does not meet your needs, you can write your own custom transmitting
program in Polycode. For instance, if you wanted to transmit your data in some sorted
order, you could create an index file in the FieldBook, then write a program to transmit lines
in the order they appear in the index file.

A sample Polycode program to transmit a file line by line follows:

OPN

FIELDDAT

;Open data file

CON

1

;Load constant = 1 in A register

PSH

;Load constant = 1 in B register

PSH

;Load constant = 1 in C register

SLC

;Set file pointer to top of file

LCT

;Load total number of lines in B register and total
number of columns in A register

POP

;Load total number of lines in A register

STO

10

;Store total number of lines in register 10

LOOP: TRL

;Start loop, transmit line of data

DJZ

10, DONE

;If register 10 = 0 then go to label DONE

ILP

;Increment line pointer (go to next line in data file),

JMP

LOOP

;Jump to start of loop

DONE: CDS

0, 64

;Label DONE, clear FieldBook display

WID

16

;Set display width to 16

VUM

"Transmission"

;View message

CDS

16, 0

;Set cursor to beginning of second line

VUM

"Complete"

;Show message

END

;Quit program

See Section 6, Programming the FieldBook, for details on how to write a Polycode program.