tsoding / porth

It's like Forth but in Python
628 stars 50 forks source link

32bit load and store intrinsics #81

Open cakemaster9001 opened 2 years ago

cakemaster9001 commented 2 years ago

Added 32bit load and store intrinsics with the same scheema as the 64 and 8-bit versions. The intrinsics work both in simulation and if they are compiled.

The functions were tested by the following program:

include "std.porth"

//prints 0
mem 0 .32
mem ,32 print

//prints 255
mem 255 .32
mem ,32 print

//prints 256
mem 256 .32
mem ,32 print

//prints 65535
mem 65535 .32
mem ,32 print

//prints 65536
mem 65536 .32
mem ,32 print

//prints 4294967295
mem 4294967295 .32
mem ,32 print

//prints 0
mem 4294967296 .32
mem ,32 print