INTERFACEThe procedures in this interface write values of various types into a byte stream. All procedures take to VAR (*INOUTWriteVal ; IMPORT JunoRT, JunoValue;
variables: a byte stream "code" and an offset in that bytestream. The instructions first test if the bytestream is long enough; if not, they set "code" to a new bytesteam with the same prefix (up to location "loc") that is large enough. These procedures also advance "loc" to point to the byte in the stream after the last one written for the value. *) TYPE Code = JunoRT.ByteStream; JVReal = JunoValue.Real; PROCEDURE UShort(VAR (*IO*) code: Code; VAR (*IO*) loc: CARDINAL; v: CARDINAL);
Writev
as an unsigned 16-bit value tocode
at locationloc
.
PROCEDURE Short(VAR (*IO*) code: Code; VAR (*IO*) loc: CARDINAL; v: INTEGER);
Writev
as a signed 16-bit value tocode
at locationloc
.
PROCEDURE ULong(VAR (*IO*) code: Code; VAR (*IO*) loc: CARDINAL; v: CARDINAL);
Writev
as an unsigned 32-bit value tocode
at locationloc
.
PROCEDURE Real(VAR (*IO*) code: Code; VAR (*IO*) loc: CARDINAL; v: JVReal);
Writev
as a real number tocode
at locationloc
.
END WriteVal.