; ; ; stream.a ; Newton Streamed Object Format (NSOF) definitions ; ; Author: Jonathan Kipling Knight ; Created: 12/26/2000 ; Modified: 12/27/2000 ; ; kNSOFversion EQU 2 kMagicNumber EQU 0xFF kImmediateOp EQU 0 kCharacterOp EQU 1 kUnicodeCharacterOp EQU 2 kBinaryObjectOp EQU 3 kArrayOp EQU 4 kPlainArrayOp EQU 5 kFrameOp EQU 6 kSymbolOp EQU 7 kStringOp EQU 8 kPrecedentOp EQU 9 kNILOp EQU 10 kSmallRectOp EQU 11 kLargeBinaryOp EQU 12 MACRO NSOFSize $n [ $n >= kMagicNumber DCB kMagicNumber DCB ($n:SHR:24):AND:0xFF DCB ($n:SHR:16):AND:0xFF DCB ($n:SHR:8):AND:0xFF DCB ($n:SHR:0):AND:0xFF | DCB $n ] MEND MACRO NSOFString $str DCB kStringOp NSOFSize :LEN:$str DCB $str MEND MACRO NSOFSymbol $str DCB kSymbolOp NSOFSize :LEN:$str DCB $str MEND MACRO NSOFNil DCB kNILOp MEND MACRO NSOFCharacter $n [ $n < kMagicNumber DCB kCharacterOp DCB $n | DCB kUnicodeCharacterOp DCB ($n:SHR:8):AND:0xFF DCB $n:AND:0xFF ] MEND MACRO NSOFImmediate $r [ $r