Documentation ¶
Index ¶
- Constants
- func AddUnsharedPage() int
- func BmcdchReadReg(reg int) dg.WordT
- func BmcdchReadSlot(slot int) dg.DwordT
- func BmcdchReset()
- func BmcdchWriteReg(reg int, data dg.WordT)
- func BmcdchWriteSlot(slot int, data dg.DwordT)
- func BoolToInt(b bool) int
- func BoolToOZ(b bool) byte
- func BoolToOnOff(b bool) string
- func BoolToYN(b bool) byte
- func ClearDwbit(dword *dg.DwordT, bitNum uint)
- func ClearQwbit(qword *dg.QwordT, bitNum uint)
- func ClearWbit(word *dg.WordT, bitNum uint)
- func DGdoubleToFloat64(q dg.QwordT) (f float64)
- func DGsingleToFloat64(s dg.DwordT) (f float64)
- func DecIntToInt(decType int, dec string) (i int)
- func DecodeDecDataType(dti dg.DwordT) (scaleFactor int8, decType int, size int)
- func DumpToFile(fn string) bool
- func DwordFromTwoWords(hw dg.WordT, lw dg.WordT) dg.DwordT
- func DwordGetLowerWord(dwd dg.DwordT) dg.WordT
- func DwordGetUpperWord(dwd dg.DwordT) dg.WordT
- func FlipWbit(word *dg.WordT, bitNum uint)
- func Float64toDGdouble(f float64) (q dg.QwordT)
- func Float64toDGsingle(f float64) (s dg.DwordT)
- func GetDwbits(value dg.DwordT, leftBit uint, nbits uint) dg.DwordT
- func GetFirstSharedPage() dg.DwordT
- func GetLastSharedPage() dg.DwordT
- func GetLastUnsharedPage() dg.DwordT
- func GetNumSharedPages() int
- func GetQwbits(value dg.QwordT, leftBit uint, nbits uint) dg.QwordT
- func GetSegment(addr dg.PhysAddrT) int
- func GetWbits(value dg.WordT, leftBit uint, nbits uint) dg.WordT
- func IsPageMapped(page int) (locked bool)
- func LoadFromASCIIFile(asciiOctalFilename string) string
- func MapPage(page int, shared bool)
- func MapSlice(addr dg.PhysAddrT, wds []dg.WordT, shared bool)
- func MemInit(wordSize int, doLog bool)
- func NsPop(seg dg.PhysAddrT, debugging bool) dg.WordT
- func NsPush(seg dg.PhysAddrT, data dg.WordT, debugging bool)
- func QwordFromTwoDwords(hdw dg.DwordT, ldw dg.DwordT) dg.QwordT
- func QwordGetLowerDword(qwd dg.QwordT) dg.DwordT
- func QwordGetUpperDword(qwd dg.QwordT) dg.DwordT
- func ReadByte(wordAddr dg.PhysAddrT, loByte bool) dg.ByteT
- func ReadByteEclipseBA(pcAddr dg.PhysAddrT, byteAddr16 dg.WordT) dg.ByteT
- func ReadBytes(ba32 dg.DwordT, pc dg.PhysAddrT, num int) (res []byte)
- func ReadDWord(addr dg.PhysAddrT) dg.DwordT
- func ReadDec(ba dg.PhysAddrT, size int) (dec string)
- func ReadDwordTrap(wordAddr dg.PhysAddrT) (dg.DwordT, bool)
- func ReadEclipseWordTrap(wordAddr dg.WordT) (dg.WordT, bool)
- func ReadNBytes(ba dg.PhysAddrT, n int) []byte
- func ReadWord(wordAddr dg.PhysAddrT) dg.WordT
- func ReadWord16(wordAddr dg.WordT) dg.WordT
- func ReadWordBmcChan(addr *dg.PhysAddrT) dg.WordT
- func ReadWordBmcChan16bit(addr *dg.WordT) dg.WordT
- func ReadWordDchChan(addr *dg.PhysAddrT) dg.WordT
- func ReadWordTrap(wordAddr dg.PhysAddrT) (dg.WordT, bool)
- func SetDwbit(dw *dg.DwordT, bitNum uint)
- func SetQwbit(qw *dg.QwordT, bitNum uint)
- func SetWbit(word *dg.WordT, bitNum uint)
- func SexWordToDword(wd dg.WordT) dg.DwordT
- func SwapBytes(wd dg.WordT) (res dg.WordT)
- func TestBbit(b8 dg.ByteT, b int) bool
- func TestDwbit(dw dg.DwordT, b int) bool
- func TestQwbit(qw dg.QwordT, b int) bool
- func TestWbit(w dg.WordT, b int) bool
- func UnmapPage(page int, shared bool)
- func WordToBinStr(w dg.WordT) string
- func WordsFromBytes(ba []byte) (wa []dg.WordT)
- func WriteByte(wordAddr dg.PhysAddrT, loByte bool, b dg.ByteT)
- func WriteByteBA(byteAddr dg.DwordT, b dg.ByteT)
- func WriteBytesBA(b []byte, byteAddr dg.DwordT)
- func WriteDWord(wordAddr dg.PhysAddrT, dwd dg.DwordT)
- func WriteStringBA(s string, byteAddr dg.DwordT)
- func WriteWord(wordAddr dg.PhysAddrT, datum dg.WordT)
- func WriteWord16(wordAddr dg.WordT, datum dg.WordT)
- func WriteWordBmcChan(addr *dg.PhysAddrT, data dg.WordT)
- func WriteWordBmcChan16bit(addr *dg.WordT, data dg.WordT)
- func WriteWordDchChan(unmappedAddr *dg.PhysAddrT, data dg.WordT) (physAddr dg.PhysAddrT)
Constants ¶
const ( UnpackedDecTSC = 0 UnpackedDecLSC = 1 UnpackedDecTS = 2 UnpackedDecLS = 3 // <sign><zeroes><int> UnpackedDecU = 4 // <zeroes><int> PackedDec = 5 TwosCompDec = 6 FPDec = 7 )
Decimal Data Types - values are significant
const ( NspLoc = 040 // 32. Narrow Stack Pointer NfpLoc = 041 NslLoc = 042 NsfaLoc = 043 )
Some Page Zero special locations for the Narrow Stack
Variables ¶
This section is empty.
Functions ¶
func AddUnsharedPage ¶
func AddUnsharedPage() int
AddUnsharedPage appends an unshared page to virtual memory
func BmcdchReadReg ¶
BmcdchReadReg returns the single word contents of the requested register
func BmcdchReadSlot ¶
BmcdchReadSlot returns the doubleword contents of the requested SLOT
func BmcdchWriteReg ¶
BmcdchWriteReg populates a given 16-bit register with the supplied data N.B. Addressed by REGISTER not slot
func BmcdchWriteSlot ¶
BmcdchWriteSlot populates a whole SLOT (pair of registers) with the supplied doubleword N.B. Addressed by SLOT not register
func ClearDwbit ¶
ClearDwbit clears a single bit in a DG doubleword
func ClearQwbit ¶
ClearQwbit clears a single bit in a DG quadword
func DGdoubleToFloat64 ¶
DGdoubleToFloat64 converts a DG Double Precison number to Go float64
func DGsingleToFloat64 ¶
DGsingleToFloat64 converts a DG Single Precison number to Go float64
func DecIntToInt ¶
DecIntToInt returns an int value of the DG Decimal integer supplied
func DecodeDecDataType ¶
DecodeDecDataType extracts the scale, type and length from a Decimal Type Indicator
func DumpToFile ¶
DumpToFile writes out usefully greppable text representation of memory.
func DwordFromTwoWords ¶
DwordFromTwoWords - catenate two DG Words into a DG DoubleWord
func DwordGetLowerWord ¶
DwordGetLowerWord gets the DG-lower word (RHS) of a doubleword Called VERY often, hopefully inlined!
func DwordGetUpperWord ¶
DwordGetUpperWord gets the DG-higher word (LHS) of a doubleword Called VERY often, hopefully inlined!
func Float64toDGdouble ¶
Float64toDGdouble converts a standard Go float64 into the DG Double Precision format
func Float64toDGsingle ¶
Float64toDGsingle converts a standard Go float64 into the DG Single Precision format
func GetDwbits ¶
GetDwbits - in the DG world, the first (leftmost) bit is numbered zero... extract nbits from value starting at leftBit
func GetFirstSharedPage ¶
GetFirstSharedPage is a getter for the lowest shared page currently mapped
func GetLastSharedPage ¶
GetLastSharedPage calculates the last shared page mapped
func GetLastUnsharedPage ¶
GetLastUnsharedPage is a getter for the highest unshared page currently mapped
func GetNumSharedPages ¶
func GetNumSharedPages() int
GetNumSharedPages is a getter for the number of shared pages currently mapped
func GetQwbits ¶
GetQwbits - in the DG world, the first (leftmost) bit is numbered zero... extract nbits from value starting at leftBit
func GetSegment ¶
GetSegment - return the segment number for the supplied address
func GetWbits ¶
GetWbits - in the DG world, the first (leftmost) bit is numbered zero... extract nbits from value starting at leftBit
func IsPageMapped ¶
func LoadFromASCIIFile ¶
LoadFromASCIIFile reads a CSV-formatted ASCII file representing the contents of memory in octal words and loads it directly into memory. It can be used to directly load assembled listings such as diagnostics.
func MapSlice ¶
MapSlice maps (copies) the provided slice to virtual memory starting at the given address
func QwordFromTwoDwords ¶
QwordFromTwoDwords - catenate two DG DoubleWords into a DG QuadWord
func QwordGetLowerDword ¶
QwordGetLowerDword gets the DG-lower (RHS) of a quadword
func QwordGetUpperDword ¶
QwordGetUpperDword gets the DG-upper (LHS) of a quadword
func ReadByte ¶
ReadByte - read a byte from memory using word address and low-byte flag (true => lower (rightmost) byte)
func ReadByteEclipseBA ¶
ReadByteEclipseBA - read a byte - special version for Eclipse Byte-Addressing
func ReadDwordTrap ¶
ReadDwordTrap returns the doubleword at the given physical address
func ReadEclipseWordTrap ¶
ReadEclipseWordTrap returns the DG Word at the specified 16-bit physical address
func ReadNBytes ¶
ReadNBytes loads n bytes into a slice which is returned - no ring-forcing is performed
func ReadWord16 ¶
ReadWord16 returns the DG Word at the specified physical address
func ReadWordBmcChan ¶
ReadWordBmcChan reads a word from memory over the virtual Burst Multiplex Channel addr is incremented after use
func ReadWordBmcChan16bit ¶
ReadWordBmcChan16bit reads a word from memory over the virtual Burst Multiplex Channel for 16-bit devices
func ReadWordDchChan ¶
ReadWordDchChan - reads a 16-bit word over the virtual DCH channel addr is incremented after use
func ReadWordTrap ¶
ReadWordTrap returns the DG Word at the specified physical address
func SexWordToDword ¶
SexWordToDword - sign-extend a DG word to a DG DoubleWord
func WordToBinStr ¶
WordToBinStr - get a pretty-printable string of a word
func WordsFromBytes ¶
WordsFromBytes converts a slice of (Go) bytes into a slice of DG Words
func WriteByteBA ¶
WriteByteBA writes a byte to a standard Byte Addressed location
func WriteBytesBA ¶
WriteBytesBA copies a byte array to the specified address
func WriteDWord ¶
WriteDWord writes a doubleword into memory at the given physical address
func WriteStringBA ¶
WriteStringBA copies a string to the specified address
func WriteWord ¶
WriteWord - For the 32-bit emulator ALL memory-writing should ultimately go through this function N.B. minor exceptions may be made for NsPush() and NsPop()
func WriteWord16 ¶
WriteWord16 - For the 16-bit emulators ALL memory-writing should ultimately go through this function N.B. minor exceptions may be made for NsPush() and NsPop()
func WriteWordBmcChan ¶
WriteWordBmcChan writes a word over the virtual Burst Multiplex Channel
func WriteWordBmcChan16bit ¶
WriteWordBmcChan16bit writes a word over the virtual Burst Multiplex Channel for 16-bit devices
Types ¶
This section is empty.