Home
Name Modified Size InfoDownloads / Week
Release_07 2018-06-13
Release_06 2018-05-19
Release_05 2018-05-03
Release_04 2018-04-11
Release_03 2018-03-19
Release_02 2018-02-07
Release_01 2018-02-03
Readme.txt 2018-06-15 2.7 kB
ReadChanges.txt 2018-05-29 24.0 kB
ReadHowAddr.txt 2018-05-29 2.7 kB
ReadWiki.txt 2018-05-29 1.8 kB
MemoryMap512K.png 2018-05-19 22.4 kB
MemoryMap64K.png 2018-05-19 23.4 kB
MemoryMap128K.png 2018-05-19 22.7 kB
Totals: 14 Items   99.7 kB 2
How the relative jump address works in FlexxCpu.

Every jump statement, for example: JMP, BRLT, BRNE, CALL, etc...
can have an absolute mem-address, a line-number or relative mem-address.
If the jump address is <= 0 then it works as relative jump address starting from the jump opcode.
For example: JMPL -2  jumps back by 2 memory locations starting from JMPL memory location.
Jump to relative +0 memory address is allowed (it means to jump at same opcode!)
Jump to relative +1 memory address is not allowed because is > 0.
When the jump address is > 0 then it becomes an absolute memory address.


How the absolute jump address works in FlexxCpu.

The absolute jump address is caused when the jump address is > 0.
When the jump address is > 0 the address starts from 0x0001 to max memory.
Jump to an absolute memory address 0x0000 is not allowed, it will be considered 
to relative address 0x0000 which it means to jump to the same opcode!
You can always define new jump statement which it permits to do...


How the Line Address works in FlexxCpu.

The line-number option works similarly as in the old Basic language.
Line numbers are not memory addresses, but rather they are points of code to which we can jump.
When the assembly code is processed by the preprocessor() function, then the line numbers are 
converted into absolute memory addresses.
For example: DEF 0x100  just defines a line number 0x100.
Now we can use: JMP 0x100   ==> which it means to jump at the first instruction after DEF 0x100.
Almost all jump instructions can use this option: 
BRLT,BRGT,BREQ,BRNE,LDA,DJNZ,CALL,JMPE,JMPL,JMPN,JMPG,JMP
Line numbers can be any integer you want because, after, they'll be 
translated into absolute memory addresses.


The ALIAS opcode.

The ALIAS opcode named 'ALS' has the purpose to use an alternate name to the instructions of the cpu.
for example, the assembly: ALS JSR CALL means that the name JSR can be used instead of the CALL cpu instruction.

Notice1: about constants character and strings: escape sequences are not permitted! (for example: "\n" or "\0" ...)
Notice2: About the undocumented syntax "ALS EQU, ALS" it does not works and is not used for nothing. Do not use it anywhere. The new instruction EQU cannot be used instead of the ALS. It was my mistake of development of ALS syntax.


Summary of types of jump:

JUMP to relative memory address: always <= 0 (integer or hexadecimal)
JUMP to absolute memory address: always > 0 (integer or hexadecimal or label)
JUMP to absolute address 0x0000: it's not allowed (you can avoid it with line numbers)
JUMP to line number ...........: any integer you want (decimal or hexadecimal)
JUMP to label .................: any label you want (alphanumeric string)

Source: Readme.txt, updated 2018-06-15