add compares to conditional jump instructions
This commit is contained in:
parent
8f527338ae
commit
15a4be17e3
2 changed files with 11 additions and 8 deletions
|
@ -74,6 +74,9 @@ plus six new ones:
|
||||||
- `//` is for comments
|
- `//` is for comments
|
||||||
- `\n\n` does nothing (used for spacing)
|
- `\n\n` does nothing (used for spacing)
|
||||||
|
|
||||||
|
Also, the conditional jump instructions now have a `cmp rax, rbx`
|
||||||
|
built into them.
|
||||||
|
|
||||||
## labels
|
## labels
|
||||||
|
|
||||||
Labels are the most important new feature of this language.
|
Labels are the most important new feature of this language.
|
||||||
|
@ -174,7 +177,7 @@ the number of blank lines must be a multiple of 3!
|
||||||
Many of the limitations of our previous compilers apply to this one. Also,
|
Many of the limitations of our previous compilers apply to this one. Also,
|
||||||
if you use a label without defining it, it uses address 0, rather than outputting
|
if you use a label without defining it, it uses address 0, rather than outputting
|
||||||
an error message. This could be fixed: if the value in the label table is 0 and we are
|
an error message. This could be fixed: if the value in the label table is 0 and we are
|
||||||
on the second pass, output an error message. This compiler was already tedious enough
|
on the second pass, output an error message. Also, duplicate labels aren't detected.
|
||||||
to implement, though!
|
|
||||||
But thanks to labels, for future compilers at least we won't have to calculate
|
But thanks to labels, for future compilers at least we won't have to calculate
|
||||||
any jump offsets manually.
|
any jump offsets manually.
|
||||||
|
|
12
02/in01
12
02/in01
|
@ -14152,20 +14152,20 @@ the formatting changed appropriately.
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;02;0f;87;00;00;00;00;00
|
;05;48;39;d8;0f;87;00;00 ja
|
||||||
;02;0f;82;00;00;00;00;00
|
;05;48;39;d8;0f;82;00;00 jb
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;02;0f;84;00;00;00;00;00
|
;05;48;39;d8;0f;84;00;00 je
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;02;0f;8f;00;00;00;00;00
|
;05;48;39;d8;0f;8f;00;00 jg
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;02;0f;8c;00;00;00;00;00
|
;05;48;39;d8;0f;8c;00;00 jl
|
||||||
;01;e9;00;00;00;00;00;00
|
;01;e9;00;00;00;00;00;00
|
||||||
;02;0f;85;00;00;00;00;00
|
;05;48;39;d8;0f;85;00;00 jn
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
;00;00;00;00;00;00;00;00
|
;00;00;00;00;00;00;00;00
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue