https://github.com/tkmru/cibo
x86 emulator written in Go. (CURRENTLY UNDER DEVELOPMENT)
https://github.com/tkmru/cibo
Last synced: about 23 hours ago
JSON representation
x86 emulator written in Go. (CURRENTLY UNDER DEVELOPMENT)
- Host: GitHub
- URL: https://github.com/tkmru/cibo
- Owner: tkmru
- License: mit
- Created: 2017-05-06T18:10:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T04:44:04.000Z (over 6 years ago)
- Last Synced: 2025-04-14T21:12:01.470Z (6 months ago)
- Language: Go
- Homepage:
- Size: 92.8 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cibo
**CURRENTLY UNDER DEVELOPMENT**
```cibo``` is a tool I've made to learn Golang and make somes experiments with CPU.
## Installation
The ```go get``` command compile the binary and place it in your ```$GOPATH/bin``` directory.```
go get github.com/tkmru/cibo
```## How to use
```cibo``` can be used from command.```
$ ./cibo help
cibo - x86 CPU emulatorUsage:
cibo [flags]
cibo [command]Available Commands:
help Help about any command
version Print the version numberFlags:
-b, --bit int bit mode (default 32)
--debug debug mode
-h, --help help for ciboUse "cibo [command] --help" for more information about a command.
```Also, ```cibo``` can be used api like unicorn.
```
package mainimport (
"github.com/tkmru/cibo/core"
)func main() {
beginAddress := 0x7c00
emu := cibo.NewEmulator(32, beginAddress, 29, true)
cpu := emu.CPU
reg := &cpu.X86registersemu.RAM = []byte{0xb8, 0x01, 0x00, 0x00, 0x00, 0x3d, 0x02, 0x00, 0x00, 0x00, 0x75, 0x05, 0xe9, 0xef, 0x83, 0xff,
0xff, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x02, 0x00, 0x00, 0x00, 0x74, 0xef}
/*
mov eax, 0x1
cmp eax, 0x2
jnz not_equalequal:
jmp 0not_equal:
mov eax, 0x2
cmp eax, 0x2
jz equal
*/reg.Init()
emu.Run()
}
```## License
The MIT License