docs: Add more documents (but they're unfinished)
This commit is contained in:
parent
c27f3405cd
commit
571729dafa
53
docs/instructions.md
Normal file
53
docs/instructions.md
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# Fox32 instructions
|
||||||
|
|
||||||
|
This file describes every Fox32 instruction in detail. For a general
|
||||||
|
description of the Fox32 CPU, see cpu.md.
|
||||||
|
|
||||||
|
## NOP: no operation
|
||||||
|
## ADD: add
|
||||||
|
## MUL: multiply (unsigned)
|
||||||
|
## AND: bitwise AND
|
||||||
|
## SLA: shift left
|
||||||
|
## SRA: shift right arithmetic (with sign extension)
|
||||||
|
## BSE: bit set
|
||||||
|
## CMP: compare
|
||||||
|
## JMP: absolute jump
|
||||||
|
## RJMP: relative jump
|
||||||
|
## PUSH: push value to stack
|
||||||
|
## IN: get input from I/O bus
|
||||||
|
## ISE: set interrupt enable flag
|
||||||
|
## MSE: set MMU enable flag
|
||||||
|
## HALT: halt CPU
|
||||||
|
## INC: increment (add 1)
|
||||||
|
## OR: bitwise OR
|
||||||
|
## IMUL: multiply (signed)
|
||||||
|
## SRL: shift right logical (with zero extension)
|
||||||
|
## BCL: bit clear
|
||||||
|
## MOV: move value
|
||||||
|
## CALL: absolute call
|
||||||
|
## RCALL: relative call
|
||||||
|
## POP: pop value from stack
|
||||||
|
## OUT: output on I/O bus
|
||||||
|
## ICL: clear interrupt enable flag
|
||||||
|
## MCL: clear MMU enable flag
|
||||||
|
## BRK: debug breakpoint
|
||||||
|
## SUB: subtract
|
||||||
|
## DIV: divide (unsigned)
|
||||||
|
## XOR: bitwise XOR
|
||||||
|
## ROL: rotate left
|
||||||
|
## ROR: rotate right
|
||||||
|
## BTS: test if bit set
|
||||||
|
## MOVZ: move value and clear upper bits in target register
|
||||||
|
## LOOP: absolute loop
|
||||||
|
## RLOOP: relative loop
|
||||||
|
## RET: return from function
|
||||||
|
## INT: raise interrupt
|
||||||
|
## TLB: flush TLB and set page directory pointer
|
||||||
|
## DEC: decrement (subtract 1)
|
||||||
|
## REM: calculate remainder of division (unsigned)
|
||||||
|
## NOT: bitwise NOT
|
||||||
|
## IDIV: divide (signed)
|
||||||
|
## IREM: remainder (signed)
|
||||||
|
## RTA: calculate address relative to instruction pointer
|
||||||
|
## RETI: return from interrupt
|
||||||
|
## FLP: flush page from TLB
|
15
docs/io_bus.md
Normal file
15
docs/io_bus.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# I/O bus
|
||||||
|
|
||||||
|
| start | end | description
|
||||||
|
|------------|------------|---------------------------------------
|
||||||
|
| 0x00000000 | 0x00000000 | debug serial port
|
||||||
|
| 0x80000000 | 0x8000031f | display overlay
|
||||||
|
| 0x80000400 | 0x80000401 | mouse
|
||||||
|
| 0x80000500 | 0x80000500 | keyboard
|
||||||
|
| 0x80000600 | 0x80000600 | audio
|
||||||
|
| 0x80000700 | 0x80000706 | RTC
|
||||||
|
| 0x80001000 | 0x80005003 | disk
|
||||||
|
| 0x80010000 | 0x80010000 | power off
|
||||||
|
|
||||||
|
|
||||||
|
TODO: details
|
8
docs/memory.md
Normal file
8
docs/memory.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Memory
|
||||||
|
|
||||||
|
The memory in a Fox32 system is laid out as follows:
|
||||||
|
|
||||||
|
| start | end | size | description
|
||||||
|
|------------|------------|---------|---------------------------------------
|
||||||
|
| 0x00000000 | 0x04000000 | 64 MiB | RAM
|
||||||
|
| 0xf0000000 | 0xf0080000 | 512 KiB | ROM
|
Loading…
Reference in New Issue
Block a user