What processor resources can in-line assembly code use?
In-line assembly code can destructively use the following resources. None of these contain persistent information between BASIC instructions (this may change in a future version of BCI51). Therefore, you do not need to push and pop these resources. • The entire working register bank. This is usually bank0. If your target is BASIC-52 it will be bank 3. In any case, DO NOT set the register bank select bits, since other register areas are used for various runtime flags. Let BCI51 do that for you and just use whatever bank it has selected. R0..R7 will always refer to the currently selected register bank. • DPTR • B register • Accumulator • Internal RAM (data MOV instructions) can be accessed if you move the stack pointer up and reserve space for yourself. See the #ISTACK START configuration directive. • External RAM (data MOVX instructions) can be accessed, typically through the DPTR. BCI51 assigns addresses to system and user variables, and these can change with various options and as you