Everything is a Register!
sig
siguctua at gmail.com
Mon May 7 12:28:40 UTC 2007
and in addition, a simple example why i'm not using a smalltalk
standart selectors.
for loading a value via indirect pointer you might put with my syntax:
val := b loadDword loadDword. " load value from memory location
pointed by b, then load value pointed by value "
same , but using smalltalk standart selectors:
val := self at: (self at: b) .
more complex case:
val := (b loadDword + 4) loadDword
in smalltalk will look like:
val := self at: (self at: b) + 4 .
---
conditional branching smalltalk:
(a > b ) ifTrue: [] ifFalse:[]
my syntax:
(a cmp: b) ifGreater: [] else: []
or
a = b ifGreater: [] else: []
--
checking for a zero:
( a := b - 1 ) ifZero: [] ..
smalltalk:
a := b - 1.
a = 0 ifTrue: [] ..
--
there also branching selectors like ifCarry, ifOverflow which don't
have a meaning in smalltalk at all.
More information about the Squeak-dev
mailing list
|