Read HellyRISC architecture overview
- Bootloader load to RAM basic input/output system, which provide some interrupts and containts programs to display strings, run programs and other.
- Bootloader copy to memory code from SD-card
- CPU-enabled flag it turn-on and calling RESET interrupt.
Available 4 CPU with 4 threads per CPU.
Any CPU starts from @00_00 + 4 * CPU_ID
. For example:
x0000: h0F00; // reset (initial) address
...
x0F00: jmp CPU_1_main; // start instruction for CPU_1
x0F04: jmp CPU_2_main; // start instruction for CPU_2
x0F08: jmp h0F08; // instruction for CPU_3 (awaiting for command)
x0F0A: jmp h0F0A; // instruction for CPU_4 (awaiting for command)
CPU 2, 3, 4 is disabled by default;
; CPU's:
OR $cpu, b0010 ; set $cpu[2] to 1 to enable CPU_2;
AND $cpu, b1101 ; set $cpu[2] to 0 to disable CPU_2;
; THREADS:
THR_CH TH_ID ; change current thread to TH_ID. Will changes registes and stack pointer bank.
THR_RST TH_ID, START_ADDR ; reset TH_ID thread and set PC to START_ADDR and start thread
THR_SYCN uniq_id ;
#include stdio.asm
.DATA
_STR "Wake up, Neo\b_";
.PROGRAM
push addr(_STR);
call print;