Skip to content

Catalog

Everything collectors track, in one database: games, hardware, ADAM software, the Library and memorabilia.

Your browser is older than this site is made for, so some colors and layouts may look wrong. Everything still works; for the best view, update it (Safari 16.4, Chrome or Edge 111, Firefox 121 or newer).
Books & Magazines Library

ColecoVision Programmer's Manual

A scan, 451 pages. Download the PDF

Opening the page… If it does not appear, open the PDF instead (the page reader needs JavaScript and a recent browser).

Text of this page, read by machine (may contain mistakes)
COLECOVISION PROGRAMMERS' MANUAL Rev. 5 ©Coleco Industries, Inc. 1982 CONFIDENTIAL DOCUMENT = DO NOT COPY 9-6 1 9.5 RAND_GEN 2 3 Calling Sequence: 4 5 6 CALL RAND_GEN 7 Description: 8 9 RAND_GEN is a 16-bit psuedo random number generator. It 10 "exclusive OR's" the 15th and 8th bit together and then ll rotates the entire quantity to the left and inserts the 12 "exclusive OR'ed" bit into the rightmost bit. Upon 13 leaving, it stores the random number at global location 14 RAND_NUM. 15 16 Output: The random number can be found in 17 the HL register pair or RAND_GEN 18 because RAND_GEN contains the 19 value of L while RAND_GEN + 1 has 20 the value of H, or in the accumu- 21 lator because A = L before RET. 22 238 Side Effects: 24 25 Destroys registers AF and HL (return valves). bo o

Menu