CREATE ( comp: -- <name> | exec: -- addr )
published: 9 January 2022 / updated 16 February 2022
vocabulary: forth
The word CREATE can be used alone.
The word after CREATE is created in the dictionary, here DATAS. The execution of the word thus created deposits on the data stack the memory address of the parameter zone. In this example, we have compiled 4 8-bit values. To recover them, it will be necessary to increment the address stacked with the value shifting the data to be recovered.
Example:
\ Peripherals accessed by the CPU via 0x3FF40000 ~ 0x3FF7FFFF address space \ (DPORT address) can also be accessed via 0x60000000 ~ 0x6003FFFF \ (AHB address). (0x3FF40000 + n) address and (0x60000000 + n) \ address access the same content, where n = 0 ~ 0x3FFFF. create uartAhbBase $60000000 , $60010000 , $6002E000 , : REG_UART_AHB_BASE { idx -- addr } \ id=[0,1,2] uartAhbBase idx cell * + @ ;
Legal: site web personnel sans commerce / personal site without seling
