tape: Add LSI to Tag constants
This commit is contained in:
parent
4fbb70081a
commit
8e14a2c3f1
16
tape/tag.go
16
tape/tag.go
@ -2,14 +2,17 @@ package tape
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
|
// TODO: fix #7
|
||||||
|
|
||||||
type Tag byte; const (
|
type Tag byte; const (
|
||||||
SI Tag = 0 << 5 // Small integer
|
SI Tag = 0 << 5 // Small integer
|
||||||
LI Tag = 1 << 5 // Large integer
|
LI Tag = 1 << 5 // Large unsigned integer
|
||||||
FP Tag = 2 << 5 // Floating point
|
LSI Tag = 2 << 5 // Large signed integer
|
||||||
SBA Tag = 3 << 5 // Small byte array
|
FP Tag = 3 << 5 // Floating point
|
||||||
LBA Tag = 4 << 5 // Large byte array
|
SBA Tag = 4 << 5 // Small byte array
|
||||||
OTA Tag = 5 << 5 // One-tag array
|
LBA Tag = 5 << 5 // Large byte array
|
||||||
KTV Tag = 6 << 5 // Key-tag-value table
|
OTA Tag = 6 << 5 // One-tag array
|
||||||
|
KTV Tag = 7 << 5 // Key-tag-value table
|
||||||
TNMask Tag = 0xE0 // The entire TN bitfield
|
TNMask Tag = 0xE0 // The entire TN bitfield
|
||||||
CNMask Tag = 0x1F // The entire CN bitfield
|
CNMask Tag = 0x1F // The entire CN bitfield
|
||||||
CNLimit Tag = 32 // All valid CNs are < CNLimit
|
CNLimit Tag = 32 // All valid CNs are < CNLimit
|
||||||
@ -40,6 +43,7 @@ func (tag Tag) String() string {
|
|||||||
switch tag.WithoutCN() {
|
switch tag.WithoutCN() {
|
||||||
case SI: tn = "SI"
|
case SI: tn = "SI"
|
||||||
case LI: tn = "LI"
|
case LI: tn = "LI"
|
||||||
|
case LSI: tn = "LSI"
|
||||||
case FP: tn = "FP"
|
case FP: tn = "FP"
|
||||||
case SBA: tn = "SBA"
|
case SBA: tn = "SBA"
|
||||||
case LBA: tn = "LBA"
|
case LBA: tn = "LBA"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user