9100A-017
7-11
addition to performing writes and reads to the CGA Card, the
9100 probe and clock module can take signatures of the RGBI
outputs to test the outputs.
CGA Write/Read Program Example
7.10.
The following program initializes the CGA Card in the 80
column character mode, fills the screen with ASCII characters,
and then reads back two locations.
******************************************************************************
program cga_prog
declare
global string devname
end declare
! ****************************************************************************
! READ_LOC (ADDR) - This function calls the read_cycle function with the
! vector start number (which corresponds to the address to be read), and
! processes the returned byte read.
! ****************************************************************************
function read_loc (addr)
declare
numeric addr
end declare
! *****get the vector start address*****
! $B8000 = 1, $B8001 = 4, $B8002 = 7,. . .
vec_num = ((addr - $BB000) * 3) + 1
! *****go do the read*****
byte_str = read_cycle vec_start vec_num
! *****check for stable levels on the read (no "*"'s)*****
if (instr (byte_str, "*") = 0) then
! *****stable read*****
byte_nun = val (byte_str,2)
print "Read @ "+ str (addr,16) +" = " + str (byte_num,16)
else
! *****unstable read*****
print "Read @ " + str (addr,16) + " Is Not Stable"
end if
return errflg
end function
! ****************************************************************************
! READ_CYCLE (VEC_START) - This function drives the vector at vec_start
! returns the stored readword byte.
! ****************************************************************************
function read_cycle (vec_start)
declare
numeric vec_start
global string devname
end declare
! *****set up input section for read*****
sync device devname, mode "capture"
arm device devname
vectordrive device devname, startmode "now"; vector vec_start
loop until (drivepoll device devname) = 3
end loop
readout device devname
byte_str = readword device devname, word 1, mode "stored"
return byte_str
Summary of Contents for 9100A Series
Page 6: ...vi ...
Page 8: ...viii ...
Page 10: ...x ...
Page 14: ...9100A 017 1 4 ...
Page 24: ...9100A 017 3 6 ...
Page 44: ...9100A 017 5 4 ...
Page 58: ...9100A 017 6 14 ...
Page 83: ...A 1 Appendix A New TL 1 Commands ...
Page 84: ...9100A 017 A 2 ...
Page 87: ...clockfreq 3 For More Information The Overview Of TL 1 section of the Programmer s Manual ...
Page 88: ...clockfreq 4 ...
Page 91: ...drivepoll 3 For More Information The Overview Of TL 1 section of the Programmer s Manual ...
Page 92: ...drivepoll 4 ...
Page 104: ...vectordrive 4 ...
Page 107: ...vectorload 3 For More Information The Overview Of TL 1 section of the Programmer s Manual ...
Page 108: ...vectorload 4 ...
Page 116: ...9100A 017 C 2 ...
Page 117: ...9100A 017 C 3 ...
Page 118: ...9100A 017 C 4 ...