Skip to content

Commit

Permalink
chore: document somes assembler directives
Browse files Browse the repository at this point in the history
  • Loading branch information
d0p1s4m4 committed Apr 3, 2023
1 parent ea13eec commit 4e116e3
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ all: pdf www
pdf: asm-manual.pdf

www: src/main.texi
texi2any -o $@ --html $^
texi2any -o $@ --html $^

asm-manual.pdf: src/main.texi
texi2dvi -o $@ -p $^
71 changes: 68 additions & 3 deletions src/main.texi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
* Exceptions:: describes exceptions.
* Instruction Set:: descripbes ISA
* Pseudo Op-Codes:: describes the assembler's pseudo-operations.
* Pseudo Instructions:: describes the assembler's pseudo-instructions.
* Index:: Complete index.
@end menu

Expand Down Expand Up @@ -83,6 +84,10 @@ Registers are big endian
@tab Contains the return address
@end multitable

@node Special Purpose Registers
@section Special Purpose Registers
@cindex section, special purpose registers

@node Addressing
@chapter Addressing

Expand All @@ -99,11 +104,67 @@ TODO

@node Pseudo Op-Codes
@chapter Pseudo Op-Codes
@cindex chapter, pseudo op-codes

TODO
@multitable @columnfractions .15 .15 .60
@headitem Directive @tab Arguments @tab Description
@item @code{.align}
@tab integer
@tab TODO

@item @code{.file}
@tab "filename"
@tab TODO

@item @code{.globl}
@tab symbol_name
@tab TODO

@item @code{.local}
@tab symbol_name
@tab TODO

@item @code{.section}
@tab [.text,.data,.rodata,.bss]
@tab TODO

@item @code{.string}
@tab "string"
@tab TODO

@item @code{.asciz}
@tab "string"
@tab TODO

@node Pseudo Instruction
@chapter Pseudo Instruction
@item @code{.byte}
@tab expression [, expression]*
@tab 8-bit comma separated words

@item @code{.half}
@tab expression [, expression]*
@tab 16-bit comma separated words

@item @code{.short}
@tab expression [, expression]*
@tab 16-bit comma separated words

@item @code{.word}
@tab expression [, expression]*
@tab 32-bit comma separated wordsTODO

@item @code{.long}
@tab expression [, expression]*
@tab 32-bit comma separated words

@item @code{.quad}
@tab expression [, expression]*
@tab 64-bit comma separated words

@end multitable

@node Pseudo Instructions
@chapter Pseudo Instructions
@cindex chapter, pseudo instructions

@multitable @columnfractions .25 .25 .50
@headitem Pseudo Instruction @tab Base Instruction(s) @tab Description
Expand Down Expand Up @@ -138,6 +199,10 @@ TODO
@tab @code{add r0, r0, r0}
@tab No-Op

@item @code{ret}
@tab @code{TODO}
@tab Subroutine return.

@item @code{swap ra, rb}
@tab @code{xor ra, ra, rb}
@*@code{xor rb, ra, rb}
Expand Down

0 comments on commit 4e116e3

Please sign in to comment.