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"
|
||||
|
||||
// TODO: fix #7
|
||||
|
||||
type Tag byte; const (
|
||||
SI Tag = 0 << 5 // Small integer
|
||||
LI Tag = 1 << 5 // Large integer
|
||||
FP Tag = 2 << 5 // Floating point
|
||||
SBA Tag = 3 << 5 // Small byte array
|
||||
LBA Tag = 4 << 5 // Large byte array
|
||||
OTA Tag = 5 << 5 // One-tag array
|
||||
KTV Tag = 6 << 5 // Key-tag-value table
|
||||
LI Tag = 1 << 5 // Large unsigned integer
|
||||
LSI Tag = 2 << 5 // Large signed integer
|
||||
FP Tag = 3 << 5 // Floating point
|
||||
SBA Tag = 4 << 5 // Small byte array
|
||||
LBA Tag = 5 << 5 // Large byte array
|
||||
OTA Tag = 6 << 5 // One-tag array
|
||||
KTV Tag = 7 << 5 // Key-tag-value table
|
||||
TNMask Tag = 0xE0 // The entire TN bitfield
|
||||
CNMask Tag = 0x1F // The entire CN bitfield
|
||||
CNLimit Tag = 32 // All valid CNs are < CNLimit
|
||||
@ -40,6 +43,7 @@ func (tag Tag) String() string {
|
||||
switch tag.WithoutCN() {
|
||||
case SI: tn = "SI"
|
||||
case LI: tn = "LI"
|
||||
case LSI: tn = "LSI"
|
||||
case FP: tn = "FP"
|
||||
case SBA: tn = "SBA"
|
||||
case LBA: tn = "LBA"
|
||||
|
Loading…
x
Reference in New Issue
Block a user