Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
infocom:table_of_opcodes [2024/08/18 18:26] – fix opcode 25/26 robertinfocom:table_of_opcodes [2024/11/14 21:34] (current) – external edit 127.0.0.1
Line 6: Line 6:
 | 002 | LESS? int1,int2 |||| PRED | Is int1 less than int2? | | 002 | LESS? int1,int2 |||| PRED | Is int1 less than int2? |
 | 003 | GRTR? int1,int2 |||| PRED | Is int1 greater than int2? | | 003 | GRTR? int1,int2 |||| PRED | Is int1 greater than int2? |
-| 004 | IGRTR? var,int |||| PRED | Increments the value of var by one and succeeds if the new value is greater than int. | +| 004 | DLESS? var,int |||| PRED | Decrements the value of var by one and succeeds if the new value is less than int. | 
-| 005 | DLESS? var,int |||| PRED | Decrements the value of var by one and succeeds if the new value is less than int. |+| 005 | IGRTR? var,int |||| PRED | Increments the value of var by one and succeeds if the new value is greater than int. |
 | 006 | IN? obj1,obj2 |||| PRED | Is obj1 contained in obj2? | | 006 | IN? obj1,obj2 |||| PRED | Is obj1 contained in obj2? |
 | 007 | BTST word1,word2 |||| PRED | Is every bit that is on in word2 also on in word1? | | 007 | BTST word1,word2 |||| PRED | Is every bit that is on in word2 also on in word1? |
Line 200: Line 200:
 | ::: | - | - | EXTOP:259 ASHIFT int,n || VAL | ASHIFT performs a 16-bit arithmetic shift on int, shifting it left n bits if n is positive, and right the absolute value of n bits if n is negative. In an arithmetic shift, the sign bit is propagated on rightward shifts, meaning that a negative number stays negative. | | ::: | - | - | EXTOP:259 ASHIFT int,n || VAL | ASHIFT performs a 16-bit arithmetic shift on int, shifting it left n bits if n is positive, and right the absolute value of n bits if n is negative. In an arithmetic shift, the sign bit is propagated on rightward shifts, meaning that a negative number stays negative. |
 | ::: | - | - | EXTOP:260 || VAL | Selects a particular font for the currently selected window, and returns the number of the previously selected font. If the new font cannot be selected for some reason, returns 0. The font should be remembered for that window until it is explicitly changed. Font 1 is the ”normal” font for the machine in question, and it is selected initially for both screen windows. The interpreter is responsible for updating the FWRD parameter word whenever the font changes. FONT prints and empties the output buffer. It should be possible to change fonts many times, even during a line or word of output. In ZIP20, in addition to the normal font (1), and the picture font (2), font 3 is the VT100 character graphics set. | | ::: | - | - | EXTOP:260 || VAL | Selects a particular font for the currently selected window, and returns the number of the previously selected font. If the new font cannot be selected for some reason, returns 0. The font should be remembered for that window until it is explicitly changed. Font 1 is the ”normal” font for the machine in question, and it is selected initially for both screen windows. The interpreter is responsible for updating the FWRD parameter word whenever the font changes. FONT prints and empties the output buffer. It should be possible to change fonts many times, even during a line or word of output. In ZIP20, in addition to the normal font (1), and the picture font (2), font 3 is the VT100 character graphics set. |
-| ::: | - | - | EXTOP:261 DISPLAY picture:int,x:int,y:int || | A picture is a number that indexes into the ”picture library.” DISPLAY displays a picture at the location (x,y) (specified in pixels). The location given is where the upper left corner of the picture should appear. The upper left corner of the screenis the location 1,1. If the x or y argument is not supplied or 0, then the current x or y position in the current +| ::: | - | - | EXTOP:261 DISPLAY picture:int,x:int,y:int || | A picture is a number that indexes into the ”picture library.” DISPLAY displays a picture at the location (x,y) (specified in pixels). The location given is where the upper left corner of the picture should appear. The upper left corner of the screenis the location 1,1. If the x or y argument is not supplied or 0, then the current x or y position in the current window is used. |
-window is used. |+
 | ::: | - | - | EXTOP:262 PICINF picture:int,data:tbl || PRED | PICINF is used to get data about a picture. The interpreter fills in the table data with the width (word 0) and height (word 1) of the picture specified, in pixels. | | ::: | - | - | EXTOP:262 PICINF picture:int,data:tbl || PRED | PICINF is used to get data about a picture. The interpreter fills in the table data with the width (word 0) and height (word 1) of the picture specified, in pixels. |
 | ::: | - | - | EXTOP:263 DCLEAR picture:int,x:int,y:int || | Clears the area taken up by the picture. i.e., restores the screen background color. | | ::: | - | - | EXTOP:263 DCLEAR picture:int,x:int,y:int || | Clears the area taken up by the picture. i.e., restores the screen background color. |
Line 213: Line 212:
 | 192 | - | - | - | - | | | | 192 | - | - | - | - | | |
 | 193 | EQUAL? any1,any2[,any3][,any4] |||| PRED | Is any1 equal to any2, any3, or any4? | | 193 | EQUAL? any1,any2[,any3][,any4] |||| PRED | Is any1 equal to any2, any3, or any4? |
-| 194 | | | | +| 194 | LESS? int1,int2 |||| PRED Is int1 less than int2? 
-| 195 | | | | +| 195 | GRTR? int1,int2 |||| PRED Is int1 greater than int2? 
-| 196 | | | | +| 196 | IGRTR? var,int |||| PRED Increments the value of var by one and succeeds if the new value is greater than int. 
-| 197 | | | | +| 197 | DLESS? var,int |||| PRED Decrements the value of var by one and succeeds if the new value is less than int. 
-| 198 | | | | +| 198 | IN? obj1,obj2 |||| PRED Is obj1 contained in obj2? 
-| 199 | | | | +| 199 | BTST word1,word2 |||| PRED Is every bit that is on in word2 also on in word1? 
-| 200 | | | | +| 200 | BOR word1,word2 |||| VAL Bitwise logical or. 
-| 201 | | | | +| 201 | BAND word1,word2 |||| VAL Bitwise logical and. 
-| 202 | | | | +| 202 | FSET? obj,flag |||| PRED Is this flag number set in obj? 
-| 203 | | | | +| 203 | FSET obj,flag |||| | Set flag in obj. 
-| 204 | | | | +| 204 | FCLEAR obj,flag |||| | Clear flag in obj. 
-| 205 | | | | +| 205 | SET var,any |||| | Sets the specified variable to any. 
-| 206 | | | | +| 206 | MOVE obj1,obj2 |||| | Put obj1 into obj2. 
-| 207 | | | | +| 207 | GET table,item |||| VAL Interpreting the table pointed to as a vector of words, returns the item'th element. In other words, returns the word pointed to by item times two plus table. (Tables begin with element zero.) 
-| 208 | | | | +| 208 | GETB table,item |||| VAL Similar to GET, but assumes a byte table. Returns the byte (converted to a word, of course) pointed to by item plus table. 
-| 209 | | | | +| 209 | GETP obj,prop |||| VAL Returns specified property of obj. If obj has no property prop, returns prop'th element of default property table. 
-| 210 | | | | +| 210 | GETPT obj,prop |||| VAL Gets property table prop from obj. Where GETP can only be used with single byte or single word properties, GETPT can be used with properties of any length. It returns a pointer to the property value that may then be used as a table pointer in any other table operation. 
-| 211 | | | | +| 211 | NEXTP obj,prop |||| VAL Returns the number of the property following prop in obj. Error if no property prop exists in obj. Returns zero if prop is last property. Given proper equal to zero, returns first property (i.e. is circular). 
-| 212 | | | | +| 212 | ADD int1,int2 |||| VAL Adds the integers. 
-| 213 | | | | +| 213 | SUB int1,int2 |||| VAL Subtracts int2 from int1. 
-| 214 | | | | +| 214 | MUL int1,int2 |||| VAL Multiplies the integers. 
-| 215 | | | | +| 215 | DIV int1,int2 |||| VAL Divides int1 by int2, returning the truncated quotient. 
-| 216 | | | |+| 216 | MOD int1,int2 |||| VAL Divides int1 by int2, returning the remainder. |
 | 217 | - | - | - | - | | | | 217 | - | - | - | - | | |
 | 218 | - | - | - | - | | | | 218 | - | - | - | - | | |
Line 277: Line 276:
  
 Return to [[:Infocom:]] Return to [[:Infocom:]]
 +