this ALLDEFS1
Filter:
this.setName('Snippets1')
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Bind 'this' to selection
Inspector on: lively.morphic.Window
X

Menu
Snippets2
X

Menu
We have now had a taste of the first-time user's experience of Smalltalk-72. It is time now to dig deeper and understand how it all works. We begin with the object 'disp', an instance of 'dispframe'. Dispframe provides a rectangular area in which text can be read in from the user, evaluated, displayed, and scrolled. The starting frame is only a small part of the display, leaving a large space available above for turtle geometry examples and other graphic explorations. Now however we will want to display more text, so we create a larger instance, as "disp _ dispframe 16 480 8 670 string 2000 We can make it small again when desired "disp _ dispframe 16 480 514 184 string 600 Next we need to know about all the objects in this world, how our code interacts and adds to them, and how the code actually works. At the center of this simple architecture is the class USER. show USER USER has no temps or instance variables, but many class variables. It thus serves as a dictionary of global variables in a manner which we will describe shortly. Whenever Smalltalk execution completes, normally or by error, the interpreter is wired to look up the code in USER and run it: (cr read eval print). show cr to cr (disp _ 13) This tells the display to start a newline. show read This skips a few options and then returns 'disp read'. In dispframe, we see '%read?(!dread)', and we see that dread is an internal function that prompts with an 'alto' chartacter (disp_20), reads from the keyboard into its text buffer (handling backspaces, etc) and finally calls the inner read routine that converts a character string to a sequence of tokens stored in a vector. The tokens are atoms, numbers, strings and subvectors. It doesn't get much simpler. vector % eval Sadly the eval method is not visible in Smalltalk-72; it is peeked for and invoked inside the CODE 3 that begins its code. This is where all user input ends up being executed. object % print Most classes define a method for print, and invoking it will print the result following the place where the user typed. That is the end of the (read eval print) loop. It's interesting that modern parlance condenses this to REPL, but in this dawn of OOP, all other languages used a print(eval(read)) loop. The difference is not a minor one. A conventional print routine was typically full of logic to test for many possible types of objects. This made it complex for new learners to modify, and if they made a mistake the whole system could die because the print routine was broken. In Smalltalk, adding a new type has no global perturbation, and if you mess up in the print method, it only affects your new class. We must return to 'vector % eval'. This is the heart of Smalltalk evaluation but, like everything else here it is very simple. A pc in each context makes the vector into a stream. As long as there is content remaining in the stream (ignoring periods) fetch the next item eval it Atoms eval by looking themselves up in the current context Vectors make a new context to evaluate a subexpression Everything else just returns itself apply the result to the remaining stream This means creating an activation to run this object's code with the remaining message stream. Variable lookup is mostly simple in Smalltalk-72. Whenever a message is sent, the interpreter builds and uses an 'activation record' (AR), similar to a 'context' of later Smalltalks. The activation points to the class, its instance if any, the caller of this method (another AR), the message being received (another AR), a link in the global lookup chain (another AR), the code being run (a code vector) a pc into the code a vector to hold any temporary variable values At every level of the global chain, the name is looked up in that class. If it is found, then it provides a direct value link (class variable), an activation offset (temp variable), or an instance offset (instance variable). If the name is not found, then the global link is followed to the next level up the chain. Ultimately this chain ends with the activation of USER, and this explains why USER is the natural home of all global variables. A important special case (not an exception) of Smalltalk's variable lookup is ", the quote function. Quote picks up the next item in its message and returns it unevaluated. This means that an atom representing a variable has a chance to peek for a following '_' (just another token). In this case, that atom would fetch the following value, look itself up in the global chain, and store the value wherever it is found. If not found anywhere, a new entry is made in the global USER dictionary, and the value stored there. [if you see an 'i' in the USER dictionary, there's a high likelihood that it came from a for-loop typed at the top level without a variable declaration] Before leaving this section, we should talk about how this all comes together to make a running system. Smalltalk came in two parts: a pile of Nova assembly code that got assembled and loaded into memory by the Alto OS, and a file of Smalltalk definitions known as 'ALLDEFS'. The assembly code would start running, and immediately read in ALLDEFS using a simplified form of (read eval print) that could not read strings or floats and that could only print the name of the most recent function defined. During the process, Smalltalk became more intelligent and articulate and, ultimately we would be greeted by a 'Welcome to SMALLTALK' message. If you read ALLDEFS you will note places where a simple definition in the early part is then extended later on. For instance the final version of 'to' includes a feature that collects the names of any classes that have been defined or redefined, so that the 'filout' command would know to write those definitions out to save one's work. We would then hit the Alto's 'SWAT' key that would write a copy of the entire memory on a file such as 'small.sv'. That file could then be restarted by typing 'Resume Small.sv' to the Alto OS. This simulation that you are using has loaded one of these files as an exact replica of the Alto memory (65k 16-bit words) and simulates the Alto Nova emulator to run the Smalltalk instance just as it was over 40 years ago. [At this point it must be acknowledged that the version of ALLDEFS does not perfectly match the small.sv that we have preserved. However the differences are small and should not cause a great deal of confusion. With a bit of time we can probably find a better matching pair of ALLDEFS/small.sv files] Once Smalltalk was working, we found ways to use it for complex system programming tasks, and this informed the later evolution of Smalltalk systems. In this Smalltalk-72, we had a function 'leech' that could attach to any object and read its contents as memory words, either as Smalltalk pointers or as the bits in memory. This made it possible to write a 'classprint' function that could decode the hashtable of any class, along with its encoded temporary, instance and class variable specifications. show classprint As a simpler example of such investigations, we could define to seebits x lx n i xbits (:n. :#x. 'Fasten seat belts'. "lx _ leech x. "xbits _ vector n+1. for i _ 0 to n do (xbits[i+1] _ base8 lx[i]& ). !xbits) seebits 4 (3+4) ( '0005352' '0000004' '0004215' '0003654' '0004216') From this we can learn that the address of class vector is 05350, and that the reference count of this vector at the time was 2. Classes were given blocks of storage on 8-word boundaries so that the low three bits of an object's class pointer could be used for a reference count. Reference counts that overflowed that field were entered into a separate table until they returned to a lower value. We chose reference counting to avoid delays due to storage reclamation. We can also learn that 04212 was the pointer value associated with the integer 0. A range of pointer values that could not be otherwise used for objects in memory was thus assigned to immediate integer values. Beyond a certain range, a real object was created with a full 16-bit integer value. seebits 2 8192 ('0005262' '0020000') and here we can tell that class number has an address of 05260. seebits 4 'ABC' (0005472' '0000003' '0040502' '0041777') showing us that 05470 is class string, the second word gives the character count, and an odd last character is padded with 0377. These are the kind of investigations that allow us to use the power of a general computing system to look inside itself and, in the case of this one, bring it back to life.
Snippets1
X

Menu
A series of snippets to reveal the spirit of Smalltalk-72. If you click twice to the right of an Alto character , it will select from there to the following do-it character , and then type that in to the Smalltalk-72 simulation here. You can type there directly of course, ending with a backslash for do-it. If you get a debug window, type 'done\' (five characters, no quotes) directly into the St-72 window. typing esc will restart the evaluator. For a complete restart, press Show-Nova, Restart, Show-Smalltalk [Need one simple button for this]. Note: there is a bug in this emulation: kbd is defined as to kbd (!kmap[TTY]) but kmap[19] = 5 so references to character 19 ('s) get perverted. This would be easy to fix except that, even if you change the table entry, it gets changed back :-(. The following is a workaround for it. So click after the Alto character and make a live repair :-)... to kbd c ("c _ TTY. c = 19?(!19) !kmap[c]) [Let's build this into restart if we don't find the bug first] Now sit down beside me and we'll take a look at Smalltalk-72... 3+4 We always typed this as out first evaluation after a new build. it tests a lot of stuff including how to read from keyboard, build and eval vectors (more later) and print to the display. 355.0/113 This second test runs floating-point and the floating point print routine, a mass of St-72 code. At this point we could be sure things were working right. @ go 100For new learners, this was often the first thing typed. Yay a line on the screen appears. @ turn 90 go 100 We talk about 'Smiley' the turtle and how we can tell her to turn as well as go forward. do 4 (@ go 100 turn 90) Here we have a chance to talk about how we left her at the end of a line so she started this square away from the center. do 4 (@ go 200 turn 90) Bigger is better and here is a chance to talk through why this square is where it is on the screen. @ home up erase We talk about housekeeping - Smiley is in charge of the display. 'home' takes her back to the center, 'up' tells her to point upwards, and 'erase' clears the screen. At this point, some learners want to do more with geometry, some with numbers and some with 'making things'. We'll do a bit with each and then go on to explore how this whole system works. After the above examples, it's natural to want to make squares of all sizes, and to we learn to define a new function. Here we follow the Logo use of the English defining word 'to' as follows: to square size (:size. do 4 (@ go size turn 90) This is our first function definition. It begins by declaring a temporary variable outside the code body, and the code begins with a construct read as 'fetch size' which will read a value from the following message stream, and bind it to the variable, size, that then becomes the input value to '@ go' inside the loop. Parentheses are used to indicate code structure both for the body of 'square', and the code to be repeated by 'do'. square 20square 40. square 60. square 80 It is exciting to see things happen on the screen, and more is better. We introduce a more powerful iterator... for i to 200 by 10 (square i) The induction variable offers a new dimension of experiments. for i to 200 by 2 (@ go i turn 90) It is so motivating to see things happen on the screen, and more is better. for i to 200 by 2 (@ go i turn 60) We are now exploring geometry in a very creative way. Polygons, inside angles, outside angles, etc. We make one more tool before going on to other things. Here is an exercise in variable bindings being passed among levels... to spiral angle n d ((:angle. :n. :d. for i to n by d (@ go i turn angle))) Here three parameters are fetched from the input to 'spiral', and then used to control the iterator 'for' and the inner 'go' and 'turn' messages to Smiley. @ home erase. spiral 90 400 2 It's ok to have fun. @ home erase. spiral 89 400 2@ home. spiral 91 400 2 One can see the effects of our early and simple use of the bitmap display, as the code that scrolls the text are shares the graphics area and interferes with the bottom of this design. Most early learners learn by pattern matching and rote repetition with gentle variations. It's now time to say a few words that would have interfered with our flow to this point. Let's use this Smalltalk to take a look at itself... show for to for token step stop var start exp (:"var. (%_?(:start.) "start_1). (%to?(:stop.) "stop_start). (%by?(:step.) "step_1). %do. :#exp. CODE 24) : is a primitive function that fetches values from the message stream, and it is seen here in three variants. The first, ':"var' (read 'fetch-quote') fetches the very token that is next in the message, the atom 'i' in our examples, and binds it to the temporary variable 'var'. The second, ':#exp' (read 'fetch-bind') also fetches the next token in the stream which in our examples is an embedded literal vector (array of tokens) which is the basic form of all St-72 code. The one difference with fetch-bind is that if the next token in the message is an atom, it will look up the value of that atom in the message context before binding the value to its argument. The final form of fetch, and the most common, appears as ':start' and others above. Simple fetch will start a new evaluation in the message stream, and bring its final value in to be bound to its variable if present. It's worth noting that all these forms of fetch may be used with no target variable, in which case they simpl return their value, presumably to be consumed in some other expression. By way of explaining a few more tokens, the middle three lines mean If you see '_', then fetch a value for start, otherwise set it to 1. If you see 'to', then fetch a value for stop, otherwise set it to start. If you see 'by', then fetch a value for step, otherwise set it to 1. From this it should be apparent that '%' (read as 'peek for' or 'match') looks in the message stream for a matching token. Peek is the essence of Smalltalk-72's self-defining syntax. If the following token is found in the incoming message, then the message stream will be advanced and a value of true will be returned; if not, then false will be returned and the message stream will remain undisturbed. Note also the expression '%do.' This does what it looks like - it simply consumes the token 'do' if it is found, affording the user of 'for' the option of putting the word 'do' before the loop body for clarity. While we're here, notice how conditionals work in Smalltalk-72: an 'implies-arrow' (read as 'then') in the message stream is followed by a subvector with consequent code in it. If any value other than false precedes a 'then', evaluation proceeds in the subvector instead of continuing in the outer vector. Note that when execution hits the end of the consequent subvector, it concludes evaluation of the outer vector as well. While the vector structure is not symmetric, the subvector and continuation of the outer vector behave as two equal forks chosen by the implies arrow. Finally we come to 'CODE 24', which invokes primitive code in the Smalltalk interpreter. The code escapes in this interpreter exist partly to get things going from scratch and partly to maintain reasonable performance. So far we have seen the evaluation of simple expressions, messages sent to a 'turtle' object Smiley, and some locally parsed syntax defining a for-loop. Since we have been sending messages to Smiley, let's take a look at the turtle class to see how the class is defined whose instance we have been exercising. to turtle var : pen ink width dir xor x y frame : f ( CODE 21 '%go?(draw a line of length :. !SELF) %turn?(turn right :. !SELF) %goto?(draw a line to :x :y. !SELF)' %pendn?("pen _ 1. !SELF) %penup?("pen _ 0. !SELF) %ink?(%_. :ink. !SELF) %width?(%_. :width. !SELF) %xor?("xor _ (%off?(0) 1). !SELF) %is?(ISIT eval) %home?("x _ frame  frmwd/2. "y _ frame  frmht/2. "xf _ "yf _ 0. "dir_270. !SELF) %erase?(frame fclear. !SELF) %up?("dir _ 270. !SELF) isnew?("ink _ "black. "pen _ "width _ 1. "xor _ 0. (%frame?("frame _ :) "frame _ f) %at?(:x. :y. "dir_270) SELF home) ) The first line declares names of temporary variables, instance variables and class variables. More about this later. Notice that most turtle methods end with !SELF. This means that, not only is SELF the value returned, but that it is returned 'actively', so that if any code remains in the message stream, this instance will again try to parse and execute it (as with @ go 10 turn 90). This cascading of messages is frequently convenient for objects with such streaming behavior. Take a look at the phrase '%is?(ISIT eval)'. We can't know what this is doing without knowing what ISIT is. ISIT ( % ~ ? ( ! TITLE ) ! TITLE = :") Thus, this method provides answers regarding the type of a turtle @ is ~ turtle @ is number false This same phrase is copied into each class so that all objects can answer about their type. In situations like this, we began to feel the need for a superclass 'object' with methods inherited by all the other classes. This sharing of the global method ISIT was a weak second best. It served in this early world where instances did not have direct access to their classes, and the classes were not first-class objects (ie, with code of their own). The 'isnew' phrase of turtle is notable. isnew is a special function that allows functions to act as classes. If an existing turtle receives a message, it begins running its code with SELF set to itself in the current activation record (stack frame). However if one calls 'turtle' as a function, SELF will be nil when it reaches isnew. In this case, 'isnew' creates a new instance, binds it to SELF, and returns true, thus causing the associated initalization code to be run. If SELF is set already, then isnew returns false, and the initialization code is skipped, as it should be. Knowing this, we can create a friend for Smiley, as "Winky _ turtleWinky is ~ turtle Winky width _ 3. Winky go 200 This 's construct was a violation of what we now know of as good object-oriented style, in that it allows code written outside an object to be evaluated inside. This was useful to us in several situations before we developed more disciplined ways to achieve the same goals. The ability to make multiple instances was useful even with turtles. A box could own a turtle that would always draw its border with a certain width. A fun graphical challenge is to make a commander turtle whose troop will all do the same thing but started in different directions. If alternate turtles use opposing angles, then random drawing programs make kaleidoscopic images. Essential to the notion of 'what is a Smalltalk' is that all modes of interaction be delivered to the users in a live way. From the beginning, it was possible to read the Alto's mouse x and y positions, leading to early rewards from such one-line programs as this: @ home erase. repeat (@ goto mx my) End this by pressing the escape key in the St window. [**make this work in either window] With a bit of embellishment, we have the beginnings of a paint program @ home erase. repeat (@ penup goto mx my pendn. repeat (4=mouse 4?(done) @ goto mx my)) End this by pressing the escape key in the St window. We could continue with more geometry, and interested readers will enjoy working the many examples in the Smalltalk-72 Instruction Manual.
ALTO Smalltalk-72
X

Menu
Step
Run
Lively-Web NOVA Emulator
Stop
20400: 651 JMP .-127; 020251 20401: 6160 p JSR @160; 010242 20402: 40751A STA 0,.-27; 020353 20403: 22056$. LDA 0,@56; 0124145 20404: 111000 MOV 0,2 20405: 20746! LDA 0,.-32; 020353 20406: 64451i) JSRII .+51; 021133 20407: 666 JMP .-112; 020275 20410: 4755 JSR .-23; 020365 20411: 105004 MOV 0,1,SZR 20412: 64446i& JSRII .+46; 020645 20413: 660 JMP .-120; 020273 20414: 64445i% JSRII .+45; 021600 20415: 6144 d JSR @144; 05453 20416: 655 JMP .-123; 020273 20417: 4741 JSR .-37; 020360 20420: 100513 K NEGLN 0,0,SNC 20421: 652 JMP .-126; 020273 20422: 64427i JSRII .+27; 020747 20423: 42731E STA 0,@.-47; 0400 20424: 10730 ISZ .-50; 020354 20425: 14726 DSZ .-52; 020353 20426: 774 JMP .-4; 020422 20427: 644 JMP .-134; 020273 20430: 4730 JSR .-50; 020360 20431: 100513 K NEGLN 0,0,SNC 20432: 641 JMP .-137; 020273 20433: 22721% LDA 0,@.-57; 0400 20434: 64416i JSRII .+16; 021064 20435: 10717 ISZ .-61; 020354 20436: 14715 DSZ .-63; 020353 20437: 774 JMP .-4; 020433 20440: 633 JMP .-145; 020273 20441: 20300 LDA 0,300; 0300 20442: 7234 JSR @-144,2 20443: 7233 JSR @-145,2 20444: 7237 JSR @-141,2 20445: 7226 JSR @-152,2 20446: 7227 JSR @-151,2 20447: 7236 JSR @-142,2 20450: 7235 JSR @-143,2 20451: 7217 JSR @-161,2 20452: 7221 JSR @-157,2 20453: 7232 JSR @-146,2 20454: 7223 JSR @-155,2 20455: 7230 JSR @-150,2 20456: 7220 JSR @-160,2 20457: 7222 JSR @-156,2 20460: 7215 JSR @-163,2 20461: 7224 JSR @-154,2 20462: 7213 JSR @-165,2 20463: 7214 JSR @-164,2 20464: 7214 JSR @-164,2 20465: 452 * JMP .+52; 020537 INOUT: 20466: 6201 JSR @201; 024141 20467: 21 JMP 21; 021 20470: 105000 MOV 0,1 20471: 6201 JSR @201; 024141 20472: 11 JMP 11; 011 20473: 64771i JSRII .-7; 027523 =OUTLD 20474: 101000 MOV 0,0 20475: 126460 0 SUBC 1,1 20476: 46767M STA 1,@.-11; 0452 20477: 61001b EIR 20500: 101015 MOVN 0,0,SNR 20501: 2170 x JMP @170; 01443 =RFALSE 20502: 2156 n JMP @156; 07667 =EVAL 20503: 1 JMP 1; 01 20504: 404 JMP .+4; 020510 20505: 1 JMP 1; 01 20506: 0 JMP 0; 00 20507: 20250 LDA 0,250; 0250 20510: 0 JMP 0; 00 20511: 0 JMP 0; 00 20512: 0 JMP 0; 00 20513: 0 JMP 0; 00 20514: 0 JMP 0; 00 20515: 0 JMP 0; 00 20516: 0 JMP 0; 00 20517: 0 JMP 0; 00 20520: 0 JMP 0; 00 20521: 0 JMP 0; 00 20522: 0 JMP 0; 00 20523: 0 JMP 0; 00 20524: 0 JMP 0; 00 20525: 0 JMP 0; 00 20526: 0 JMP 0; 00 20527: 0 JMP 0; 00 20530: 0 JMP 0; 00 20531: 0 JMP 0; 00 20532: 0 JMP 0; 00 20533: 0 JMP 0; 00 20534: 177777 ANDCSN 3,3,SBN 20535: 6731 JSR @.-47; 06201 20536: 374 JMP 374; 0374 20537: 54521YQ STA 3,.+121; 020660 20540: 22775% LDA 0,@.-3; 06731 20541: 24775) LDA 1,.-3; 020536 20542: 123000 ADD 1,0 20543: 4401 JSR .+1; 020544 20544: 162400 SUB 3,0 20545: 40403A STA 0,.+3; 020550 20546: 4422 JSR .+22; 020570 20547: 377 JMP 377; 0377 20550: 0 JMP 0; 00 20551: 177400 AND 3,3 20552: 22763% LDA 0,@.-15; 06731 20553: 2505 E JMP @.+105; 022732 20554: 54504YD STA 3,.+104; 020660 20555: 22760% LDA 0,@.-20; 06731 20556: 24760) LDA 1,.-20; 020536 20557: 123000 ADD 1,0 20560: 4401 JSR .+1; 020561 20561: 162400 SUB 3,0 20562: 40403A STA 0,.+3; 020565 20563: 4441 ! JSR .+41; 020624 20564: 377 JMP 377; 0377 20565: 165472 : INCCN 3,1,SZC 20566: 177400 AND 3,3 20567: 2471 9 JMP @.+71; 022732 20570: 54451Y) STA 3,.+51; 020641 20571: 4417 JSR .+17; 020610 20572: 6065 5 JSR @65; 023623 =LOAD 20573: 42445E% STA 0,@.+45; 022625 20574: 434 JMP .+34; 020630 20575: 54444Y$ STA 3,.+44; 020641 20576: 4412 JSR .+12; 020610 20577: 6065 5 JSR @65; 023623 =LOAD 20600: 6163 s JSR @163; 05522 20601: 42437E STA 0,@.+37; 022625 20602: 426 JMP .+26; 020630 20603: 54436Y STA 3,.+36; 020641 20604: 4404 JSR .+4; 020610 20605: 22433% LDA 0,@.+33; 022625 20606: 4457 / JSR .+57; 020665 20607: 421 JMP .+21; 020630 20610: 50451Q) STA 2,.+51; 020661 20611: 54431Y STA 3,.+31; 020642 20612: 344279 LDA 3,.+27; 020641 20613: 25400+ LDA 1,0,3 20614: 147000 ADD 2,1 20615: 44427I STA 1,.+27; 020644 20616: 21401# LDA 0,1,3 20617: 163000 ADD 3,0 20620: 40420A STA 0,.+20; 020640 20621: 21402# LDA 0,2,3 20622: 40421A STA 0,.+21; 020643 20623: 2417 JMP @.+17; 020605 20624: 54415Y STA 3,.+15; 020641 20625: 4763 JSR .-15; 020610 20626: 22412% LDA 0,@.+12; 022625 20627: 6067 7 JSR @67; 023630 20630: 14410 DSZ .+10; 020640 20631: 14413 DSZ .+13; 020644 20632: 24412) LDA 1,.+12; 020644 20633: 10410 ISZ .+10; 020643 20634: 2406 JMP @.+6; 020605 20635: 304241 LDA 2,.+24; 020661 20636: 344039 LDA 3,.+3; 020641 20637: 1403 JMP 3,3 20640: 22625% LDA 0,@.-153; 0452 20641: 23023& LDA 0,@23,2 20642: 20605! LDA 0,.-173; 020447 20643: 0 JMP 0; 00 20644: 40177@ STA 0,177; 0177 20645: 54413Y STA 3,.+13; 020660 20646: 40774A STA 0,.-4; 020642 20647: 44774I STA 1,.-4; 020643 20650: 6203 JSR @203; 024072 20651: 7 JMP 7; 07 20652: 24771) LDA 1,.-7; 020643 20653: 123000 ADD 1,0 20654: 6176 ~ JSR @176; 024111 20655: 7 JMP 7; 07 20656: 20764! LDA 0,.-14; 020642 20657: 2401 JMP @.+1; 022732 20660: 22732% LDA 0,@.-46; 034427 20661: 40172@z STA 0,172; 0172 20662: 20607! LDA 0,.-171; 020471 20663: 11674 ISZ -104,3 20664: 5026 JSR 26,2 20665: 44776I STA 1,.-2; 020663 20666: 54774Y STA 3,.-4; 020662 20667: 6171 y JSR @171; 05565 20670: 40774A STA 0,.-4; 020664 20671: 24772) LDA 1,.-6; 020663 20672: 6065 5 JSR @65; 023623 =LOAD 20673: 40770A STA 0,.-10; 020663 20674: 20770! LDA 0,.-10; 020664 20675: 6067 7 JSR @67; 023630 20676: 20765! LDA 0,.-13; 020663 20677: 6165 u JSR @165; 011352 20700: 307611 LDA 2,.-17; 020661 20701: 2761 JMP @.-17; 020607 20702: 54756Y STA 3,.-22; 020660 20703: 40737A STA 0,.-41; 020642 20704: 6203 JSR @203; 024072 20705: 7 JMP 7; 07 20706: 101213 MOVRN 0,0,SNC 20707: 747 JMP .-31; 020656 20710: 101400 INC 0,0 20711: 743 JMP .-35; 020654 20712: 54546Yf STA 3,.+146; 021060 20713: 24131(Y LDA 1,131; 0131 20714: 147000 ADD 2,1 20715: 6065 5 JSR @65; 023623 =LOAD 20716: 40427A STA 0,.+27; 020745 20717: 6203 JSR @203; 024072 20720: 7 JMP 7; 07 20721: 101112 J MOVLN 0,0,SZC 20722: 412 JMP .+12; 020734 20723: 40421A STA 0,.+21; 020744 20724: 101001 MOV 0,0,SKP 20725: 54533Y[ STA 3,.+133; 021060 20726: 6203 JSR @203; 024072 20727: 15 JMP 15; 015 20730: 24414) LDA 1,.+14; 020744 20731: 122133 [ ADCZLN 1,0,SNC 20732: 406 JMP .+6; 020740 20733: 121000 MOV 1,0 20734: 126000 ADC 1,1 20735: 64445i% JSRII .+45; 022463 20736: 2522 R JMP @.+122; 020755 20737: 44405I STA 1,.+5; 020744 20740: 121400 INC 1,0 20741: 6176 ~ JSR @176; 024111 20742: 7 JMP 7; 07 20743: 6204 JSR @204; 04622 20744: 660 JMP .-120; 020624 20745: 37570?x LDA 3,@170,3 20746: 2512 J JMP @.+112; 020755 20747: 54512YJ STA 3,.+112; 021061 20750: 4732 JSR .-46; 020702 20751: 4741 JSR .-37; 020712 20752: 101300 MOVS 0,0 20753: 40510AH STA 0,.+110; 021063 20754: 4751 JSR .-27; 020725 20755: 24506)F LDA 1,.+106; 021063 20756: 123000 ADD 1,0 20757: 2502 B JMP @.+102; 022120 20760: 54501YA STA 3,.+101; 021061 20761: 40415A STA 0,.+15; 020776 20762: 105400 INC 0,1 20763: 6065 5 JSR @65; 023623 =LOAD 20764: 100513 K NEGLN 0,0,SNC 20765: 2474 < JMP @.+74; 022120 20766: 40475A= STA 0,.+75; 021063 20767: 102460 0 SUBC 0,0 20770: 40405A STA 0,.+5; 020775 20771: 4721 JSR .-57; 020712 20772: 101001 MOV 0,0,SKP 20773: 4732 JSR .-46; 020725 20774: 6205 JSR @205; 04643 20775: 6242 JSR @242; 00 20776: 41220B STA 0,-160,2 20777: 14464 4 DSZ .+64; 021063
this.AC0 = 1; this.AC1 = 0; this.AC2 = 034344; this.AC3 = 020474; this.PC = 020474; this.CRY = 0; // instruction# = 0
Restart
Show Nova
About Smalltalk-72
About this Emulation
About Lively Web
Open the ST-72 Manual
ALLDEFS
Keyboard Help
Snippets1
Snippets2