[16C] why are some commands entered before their arguments?
|
03-27-2019, 07:56 PM
(This post was last modified: 03-28-2019 08:35 AM by wynen.)
Post: #10
|
|||
|
|||
RE: [16C] why are some commands entered before their arguments?
IMHO it was a good idea to make the WSIZE "programmable" (i.e. posfix). Here a sample program, which reverses the byte order for 16bit and 32 bit word size.
The progran first determines the actual word size by shifting a 1 by 16 bits to the left. A carry will indicate 16bit word size. For 32 bit, the two 16 bit integers are swaped by rotating the 32bit word 16 times. Now the word size is changed to 16 bit and the two bytes are swaped by rotating the 16 bits 8 times. Finally the word size is changed back to 32 bits and the two 16 bit words are combined. These are the features, which make the HP-16C unique. Hartmut Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)