'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 6 July 2007 at 11:20:56 pm'! !InterpreterSimulator methodsFor: 'initialization' stamp: 'mtf 7/6/2007 22:26'! reverseBytesFrom: begin to: end "Byte-swap the given range of memory (not inclusive!!)." | wordAddr | wordAddr := begin. Bitmap swapBytesIn: memory from: wordAddr // 4 + 1 to: end // 4! ! !InterpreterSimulator methodsFor: 'other primitives' stamp: 'mtf 7/6/2007 22:31'! primitiveGetAttribute "Fetch the system attribute with the given integer ID. The result is a string, which will be empty if the attribute is not defined." | attr s attribute | attr := self stackIntegerValue: 0. successFlag ifTrue: [ attribute := SmalltalkImage current getSystemAttribute: attr. attribute ifNil: [ ^self primitiveFail ]. s := self instantiateClass: (self splObj: ClassString) indexableSize: attribute size. 1 to: attribute size do: [ :i | self storeByte: i-1 ofObject: s withValue: (attribute at: i) asciiValue]. self pop: 2. "rcvr, attr" self push: s]. ! !