added MOO_EMSGRCV.
added System putUintX()/putIntX() and SmallPoitner putUintX()/putIntX()
This commit is contained in:
@ -49,6 +49,8 @@ class Character(Magnitude)
|
||||
## {
|
||||
## ^0
|
||||
## }
|
||||
|
||||
method(#primitive) asInteger.
|
||||
}
|
||||
|
||||
class Number(Magnitude)
|
||||
|
@ -333,10 +333,25 @@ class MyObject(Object)
|
||||
(System at: #Processor) dump.
|
||||
System logNl: 'Sleeping start now....'.
|
||||
|
||||
|
||||
a := System _malloc(200).
|
||||
a dump.
|
||||
i := 0.
|
||||
while (i < 26)
|
||||
{
|
||||
a putUint8(i, ($A asInteger + i)).
|
||||
i := i + 1.
|
||||
}.
|
||||
while (i > 0)
|
||||
{
|
||||
i := i - 1.
|
||||
a getUint8(i) asCharacter dump.
|
||||
}.
|
||||
a getUint32(0) dump.
|
||||
|
||||
##a dump.
|
||||
##System _free(a).
|
||||
a free.
|
||||
|
||||
Processor sleepFor: 2.
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,6 @@ extend System
|
||||
method(#class,#primitive) _getUint32 (rawptr, offset).
|
||||
method(#class,#primitive) _getUint64 (rawptr, offset).
|
||||
|
||||
(*
|
||||
method(#class,#primitive) _putInt8 (rawptr, offset, value).
|
||||
method(#class,#primitive) _putInt16 (rawptr, offset, value).
|
||||
method(#class,#primitive) _putInt32 (rawptr, offset, value).
|
||||
@ -123,8 +122,7 @@ extend System
|
||||
method(#class,#primitive) _putUint8 (rawptr, offset, value).
|
||||
method(#class,#primitive) _putUint16 (rawptr, offset, value).
|
||||
method(#class,#primitive) _putUint32 (rawptr, offset, value).
|
||||
method(#class,#primitive) _putUint64 (rawptr, offset, value),
|
||||
*)
|
||||
method(#class,#primitive) _putUint64 (rawptr, offset, value).
|
||||
}
|
||||
|
||||
|
||||
@ -132,14 +130,23 @@ class SmallPointer(Object)
|
||||
{
|
||||
method(#primitive) asString.
|
||||
|
||||
method(#primitive) getInt8 (offset).
|
||||
method(#primitive) getInt16 (offset).
|
||||
method(#primitive) getInt32 (offset).
|
||||
method(#primitive) getInt64 (offset).
|
||||
method(#primitive) getUint8 (offset).
|
||||
method(#primitive) getUint16(offset).
|
||||
method(#primitive) getUint32(offset).
|
||||
method(#primitive) getUint64(offset).
|
||||
method(#primitive) getInt8 (offset).
|
||||
method(#primitive) getInt16 (offset).
|
||||
method(#primitive) getInt32 (offset).
|
||||
method(#primitive) getInt64 (offset).
|
||||
method(#primitive) getUint8 (offset).
|
||||
method(#primitive) getUint16 (offset).
|
||||
method(#primitive) getUint32 (offset).
|
||||
method(#primitive) getUint64 (offset).
|
||||
|
||||
method(#primitive) putInt8 (offset, value).
|
||||
method(#primitive) putInt16 (offset, value).
|
||||
method(#primitive) putInt32 (offset, value).
|
||||
method(#primitive) putInt64 (offset, value).
|
||||
method(#primitive) putUint8 (offset, value).
|
||||
method(#primitive) putUint16 (offset, value).
|
||||
method(#primitive) putUint32 (offset, value).
|
||||
method(#primitive) putUint64 (offset, value).
|
||||
|
||||
method(#primitive) free.
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ class MyObject(Object)
|
||||
'resource temporarily unavailable'
|
||||
|
||||
'data too large'
|
||||
'message receiver error'
|
||||
'message sending error'
|
||||
'range error'
|
||||
'byte-code full'
|
||||
|
Reference in New Issue
Block a user