jurjen@cwi.nl (Jurjen N.E. Bos) (02/23/88)
I have forgotten to say the following things: READ displays the contents of memory addresses *backwards*: this is very handy because addresses are stored backwards, and thus directly readable. Furthermore, READ increments the address with the amount it displays, so that it is easy to continue. A handy way of getting an address of a object is putting it in a brand new variable and looking at address #4FFB0: this gives the top 80 nibbles of RAM. You'll soon find out how variables are stored and see your object. Example {+} 1 GET gives a single +. Putting this in the variable TP gives as result of #4FFB0 READ: 03A00 202D5 C0250 54020 008B0 2F902 7F1F1 A2B62 7F4E2 79BC2 7F341 783F1 7B0B2 79BC1 783F4 44145 This means: (still backwards) 03A 002 02D5C 02 50 54 02 3A 2 function 2 P T 2 Otherwise said: function number 3A,2 stored in variable PT. The name PT has two letters. More informative is << + >> 'TP' STO #$FFB0 READ: 02F90 27F1F 18F9D 27F0A end >> + << 02C67 02 50 54 02 program 2 P T 2 This learns us that the function + is to be found in ROM at 18F9D. You'll find there the code that does +, written normal way: 02C67 program 1C3A5 check two levels stack & save LAST registers 1C6FA CASE statement on type of top levels 06E00 pointer 00011: this means two reals 1EC68 + for two reals 06E0A pointer 00012: real and complex 3323C + for real and complex ... The amount of FORTH code is almost endless: you don't have to know the machine code to come rather far (but it helps). Hope you'll succeed. -- Jurjen.