Questa funzione scrive una variabile u8 in un buffer all'offset specificato.
Syntax |
set_u8 (buffer, i32 offset, u8 setVal) |
---|---|
buffer |
Can be an array, structure, or register |
offset |
Offset in bytes |
setVal |
The byte to be written |
Validity |
Task, Rule |
Note |
No range check is performed; it is up to the user to check that adding the offset and the data size does not exceed the maximum buffer size. See example. If the user wishes to write a byte into the 'data' buffer of a structure of type bbc_msguser then he must use the instruction bcc_set_u8(). The mirror function is the get_u8() |
Once you have loaded the example program on a control, via a shell you can verify the operation of set_u8. To do this, set a value between 0 and 127 - sizeof(my_data) to the variable offset, then set a non-zero value to the variable set_val and verify that the variable my_data is equal to set_val.
|