Skip to content

Commit

Permalink
Pumped version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gboncoffee committed Feb 25, 2024
1 parent 72e36bd commit 5b1362c
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 19 deletions.
18 changes: 9 additions & 9 deletions README-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

[Documentação para RISC-V](riscv-doc-pt.md)

[Documentação para MIPS](mips-doc-pt.md)

[Contribuindo, bugs, requisição de features](CONTRIBUINDO.md)

EGG (Emulador Genérico do Gabriel) é um emulador modular de arquiteturas de
processador, criado para fins educacionais.

O pacote `egg` provém uma interface para interagir com máquinas, assim provendo
suporte a diferentes backends provendo arquiteturas. No momento, há somente o
pacote `egg/riscv` de backend, implementando uma máquina RISC-V IM de 32 bits.
Um backend de MIPS é planejado para o futuro.
suporte a diferentes backends provendo arquiteturas. No momento, há backends de
RISC-V IM de 32 bits e MIPS32 (experimental).

O pacote `egg/assembler` provém uma pequena biblioteca para criação de
assemblers e o suporte ao debugger do EGG.
Expand All @@ -38,14 +39,13 @@ Windows atualmente.

Rode o emulador com um arquivo de Assembly para montá-lo e iniciar uma máquina
rodando o programa. O backend utilizado por padrão é uma máquina de RISC-V 32
bits. Use a opção `-a` ou `-arch` para mudar a arquitetura (atualmente há
somente a opção RISC-V. Um backend de MIPS é planejado para o futuro). A opção
`-h` mostra todas as opções de linha de comando e a opção `-l` mostra todas as
arquiteturas suportadas.
bits. Use a opção `-a` ou `-arch` para mudar a arquitetura. A opção `-h` mostra
todas as opções de linha de comando e a opção `-l` mostra todas as arquiteturas
suportadas.

A sintaxe de Assembly varia com a arquitetura, porém, como o projeto provém uma
biblioteca para tal, os backends podem usar uma sintaxe bem semelhante (RISC-V
usa). Exemplo:
biblioteca para tal, os backends podem usar uma sintaxe bem semelhante (RISC-V e
MIPS usam). Exemplo:

```asm
; Ponto e vírgula define comentários até o fim da linha.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@

[Documentation for RISC-V](riscv-doc.md)

[Documentation for MIPS](mips-doc.md)

[Contributing, bugs, feature requests](CONTRIBUTING.md)

EGG stands for "Emulador Genérico do Gabriel" ("Gabriel's Generic Emulator", in
portuguese). It's a modular emulator for processor architetures, made for
educational purpouses.

The `egg` package itself provides only an interface for interacting with
machines, thus supporting different architeture backends. Currently, the only
backend implemented is `egg/riscv`, which implements a RISC-V IM 32 bits
machine. A MIPS backend is coming soon.
machines, thus supporting different architeture backends. Currently, there are
RISC-V IM 32 bits and a MIPS32 (experimental) backends implemented.

`egg/assembler` also provides a small library for creating assemblers, and the
support for EGG's debugger.
Expand All @@ -39,13 +40,12 @@ machine nowadays.

Running the emulator with an Assembly file will assemble it and start a machine
to run it on. By default, the machine is a RISC-V IM 32 bits. Use the flag `-a`
or `-arch` to change the architeture (currently only RISC-V is supported, a MIPS
backend is coming soon). Run `egg -h` to see all command line options and `egg
-l` to see all supported architetures.
or `-arch` to change the architeture. Run `egg -h` to see all command line
options and `egg -l` to see all supported architetures.

The Assembly syntax is architeture-dependent. Though, a library is provided for
creating assembler, so backends may use the same overall syntax (RISC-V uses
it).
creating assembler, so backends may use the same overall syntax (both RISC-V and
MIPS uses it).

An example follows:

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func listArchs() {
}

func version() {
fmt.Println("EGG - Emulador Genérico do Gabriel - version 1.0.0")
fmt.Println("EGG - Emulador Genérico do Gabriel - version 1.1.0")
}

func runMachine(m machine.Machine) {
Expand Down
13 changes: 13 additions & 0 deletions mips-doc-pt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Read this document in English](mips-doc.md)

# MIPS32 para o EGG

A implementação de MIPS32 para o EGG usa a sintaxe de Assembly padrão descrita
no [README](README-pt.md).

Para realizar uma chamada (_environment call_), o número dela é colocado no
registrador `v0` e os argumentos nos registradores `a0` e `a1`.

Uma instrução `break` realiza a chamada BREAK.

O programa montado é carregado no endereço `0` e o `pc` é inicializado em `0`.
14 changes: 14 additions & 0 deletions mips-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Ler esse documento em português](mips-doc-pt.md)

# MIPS32 for EGG

The MIPS32 implementation for EGG uses the standard Assembly syntax described in
the [README](README.md).

Environment call numbers are placed in the `v0` register, and arguments are
placed in `a0` and `a1`.

An `break` instruction will perform a BREAK call.

The assembled program is loaded at the address `0` on the machine startup, and
the `pc` register is set to `0`.
2 changes: 1 addition & 1 deletion riscv-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ the [README](README.md). It implements the registers and instructions from the
base integer set and the multiplication extension described in
[this](riscv/riscv.pdf) document.

Environment call numbers are placed in the `a7` registers, and arguments are
Environment call numbers are placed in the `a7` register, and arguments are
placed in `a0` and `a1`.

An `ebreak` instruction will perform a BREAK call.
Expand Down

0 comments on commit 5b1362c

Please sign in to comment.