0010 <cmd > | 0<ct><grp> [ 0<sz><parm> [ 0<value> ] ] .
0011 <func>
010<txtlen> <txtlen bytes of compressed text>
011<binlen> <binlen bytes of mimed binary data>
func: | 0001 <x> <y> ? moveto
| 0010 <len> <width> <fill>? rect
| 0011 <symset> <spaceing> <points> <style> <weight> <type> ? font
| <id> ? font
| <lang> ? @PJL ENTER LANGUAGE
sz: | 01 ;small positive 1 byte <2 digits 0 to 95
| 10 ;small negative 1 byte <2 digits -95 to 0
| 11 ;large positive 2 bytes <4 digits 0 to 9216
;note that the lower order bit of sz indicates sign and xor 11 = 0 if large.
;note: neg always goes first and changes sign of remainder to positive. Should never need a large * large
;Large values: Repeat the parm with the remander.
; large * small = 0...884736,
;combos:
; neg * small = -9216...0, neg * large = -884736...0
;Fractionals: Using more than one neg or large prints the accumulator (and clears it), prints the "."
; and begins accumulating the fractional part.
; small + neg = 0...95.95, small + large = 0.0000 - 95.9215 or 0.0000 to 9.999
; large + neg = 0...9215.95, large + large = 0...9215.9215
; neg + neg = -95.95...0,
;Combos: WATCH OUT FOR neg + large which will be taken as neg * large or -884736...0
; neg * small + neg = -9215.95...0, neg * large + neg = -884736.95...0,
; neg + neg * neg = -95.9215...0, neg * large + neg * large = -884736.884736...0
01; small signed 1 byte -47 to +48
10; medium signed fraction 2 bytes -45.00 to +45.99
11; large unsigned 2 bytes 0 to 9216 *4 for 0 to 32767 (36864) *8 for 0-65536 (73728)
value: ;digit pairs multipled togeter +20h
VERSION 2
| cmd--- |
cmd-: (CTRL code, PCL command, or sepecial FUNC. Can be 21h...2Fh, (move to a...o) or E,Y,Z,9,= )
PCL: ct grp- [ t parm- ParmVal ]<@ct-->
ct: (Number of parameters for this group. 2 bits, add 1 for 1...5 )
grp-: (PCL group. Can be 60h...7Eh, usually a,b,c,d,f,l,p,r,s,t,u,v, group into a...f, l, p...v using 4 bits)
t: (Type of the value following. 0=small 1=large)
parm-: (PCL Parameter 96...126 or Termination character 64...94. Usually upper or lower case a,b,c,d,e,f,g,h,l,m,n,o,p,q,r,s,t,u,v,x,y,z )
ParmVal:
| @t 0 ? s tiny f FracPart .
| @t 1 ? s BigValue f FracPart .
tiny: (small values from 0...15 or -7...7 depending on sign bit)
| @s 0 ? uval .
| @s 1 ? sval .
uval: (4 bit unsigned number 0...15)
sval: (4 bit signed number -7...+7)
BigValue: (large values from 0...65535 or -32767...+32767)
! @s 0 ? uval- uvalue uval- f FracPart .
! @s 1 ? sval- uvalue uval- f FracPart .
uval-: (5 bit unsigned number 0...31)
sval-: (5 bit signed number -15...+15)
uvalue: (6 bit unsigned number 0...63)
FracPart: (fractional part of value. Not included if flag bit not set)
| @f 0 ? .
| @f 1 ? tf FracVal .
tf: (the type of the value of the fractional part 0=small 1=large)
FracVal: (the value of the fractional part. 0.00...0.31 or 0.000...0.2047 aka .9 or .999)
| @tf 0 ? uval- .
| @tf 1 ? uval- uvalue .
value-: | @t | 0 (small) f s v16- | @f 1 (fractional part) z f32-- | @z 1 (large fraction) f64--- ?
| ?
| ?
| 1 (large) s
parm-" (PCL parameter. Can be 60h...7Eh,