Skip to content

Commit

Permalink
Document Dd and Dq.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvanhorn committed Dec 6, 2022
1 parent 04ebd36 commit ce080a4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions www/notes/a86.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,23 @@ Each register plays the same role as in x86, so for example
]
}

@defstruct*[Jle ([x (or/c label? register?)])]{
Jump to label @racket[x] if the conditional flag is set to ``less than or equal.''

@ex[
(asm-interp
(prog
(Global 'entry)
(Label 'entry)
(Mov 'rax 42)
(Cmp 'rax 42)
(Jle 'l1)
(Mov 'rax 0)
(Label 'l1)
(Ret)))
]
}

@defstruct*[Jg ([x (or/c label? register?)])]{
Jump to label @racket[x] if the conditional flag is set to ``greater than.''

Expand All @@ -1062,6 +1079,23 @@ Each register plays the same role as in x86, so for example
]
}

@defstruct*[Jge ([x (or/c label? register?)])]{
Jump to label @racket[x] if the conditional flag is set to ``greater than or equal.''

@ex[
(asm-interp
(prog
(Global 'entry)
(Label 'entry)
(Mov 'rax 42)
(Cmp 'rax 42)
(Jg 'l1)
(Mov 'rax 0)
(Label 'l1)
(Ret)))
]
}

@defstruct*[Jo ([x (or/c label? register?)])]{
Jump to @racket[x] if the overflow flag is set.

Expand Down Expand Up @@ -1542,6 +1576,14 @@ Perform bitwise not operation (each 1 is set to 0, and each 0 is set to 1) on th
]
}

@defstruct*[Dd ([d integer?])]{
Psuedo-instruction for declaring 32-bits of initialized static memory.
}

@defstruct*[Dq ([d integer?])]{
Psuedo-instruction for declaring 64-bits of initialized static memory.
}

@section{From a86 to x86}

@defmodule[a86/printer]
Expand Down

0 comments on commit ce080a4

Please sign in to comment.