circuitpython/tests/micropython/viper_ptr8_store.py.exp
Damien George e9dac3b4d0 py: Add casting to viper; add native mem stores to viper.
Viper can now do the following:

def store(p:ptr8, c:int):
    p[0] = c

This does a store of c to the memory pointed to by p using a machine
instructions inline in the code.
2014-09-29 22:10:41 +01:00

5 lines
97 B
Plaintext

bytearray(b'\x00\x00\x00\x00')
bytearray(b'*\x00\x00\x00')
bytearray(b'++++')
bytearray(b',,,,')