Added license to all source files
This commit is contained in:
parent
8727b3fb1c
commit
5f6c7f82bc
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
15
Knight.py
15
Knight.py
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os, os.path
|
import os, os.path
|
||||||
import string
|
import string
|
||||||
import array
|
import array
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
;; add_node Function
|
;; add_node Function
|
||||||
;; Recieves pointers in R0 R1
|
;; Recieves pointers in R0 R1
|
||||||
;; Alters R0 if NULL
|
;; Alters R0 if NULL
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We will be using R0 to pass pointer to string
|
# We will be using R0 to pass pointer to string
|
||||||
# to cleared by the function
|
# to cleared by the function
|
||||||
# R15 will be used as the stack pointer
|
# R15 will be used as the stack pointer
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We will be using R0 and R1 to pass values to the function
|
# We will be using R0 and R1 to pass values to the function
|
||||||
# R15 will be used as the stack pointer
|
# R15 will be used as the stack pointer
|
||||||
:start
|
:start
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We will be using R0 request a number of bytes
|
# We will be using R0 request a number of bytes
|
||||||
# The pointer to the block of that size is to be
|
# The pointer to the block of that size is to be
|
||||||
# passed back in R0, for simplicity sake
|
# passed back in R0, for simplicity sake
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
;; Readline function
|
;; Readline function
|
||||||
;; Recieves Pointer to node in R0
|
;; Recieves Pointer to node in R0
|
||||||
;; And Input in R1
|
;; And Input in R1
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We will be using R0 and R1 to pass values to the function
|
# We will be using R0 and R1 to pass values to the function
|
||||||
# R15 will be used as the stack pointer
|
# R15 will be used as the stack pointer
|
||||||
:start
|
:start
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
## Exec_enable program
|
## Exec_enable program
|
||||||
## Takes only single arg
|
## Takes only single arg
|
||||||
## Shitty to use but essential if you need it
|
## Shitty to use but essential if you need it
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
.text # section declaration
|
.text # section declaration
|
||||||
|
|
||||||
# we must export the entry point to the ELF linker or loader.
|
# we must export the entry point to the ELF linker or loader.
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include<stdio.h>
|
#include<stdio.h>
|
||||||
#include<stdlib.h>
|
#include<stdlib.h>
|
||||||
#include<stdbool.h>
|
#include<stdbool.h>
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
## Self Bootstrapping Hex Assembler written in Hex
|
## Self Bootstrapping Hex Assembler written in Hex
|
||||||
## And a shitload of comments
|
## And a shitload of comments
|
||||||
## That can be converted to assembly and compiled
|
## That can be converted to assembly and compiled
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Our writable space
|
# Our writable space
|
||||||
.data
|
.data
|
||||||
.global _start
|
.global _start
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# ELF Header
|
# ELF Header
|
||||||
7F 45 4C 46 ## e_ident[EI_MAG0-3] ELF's magic number
|
7F 45 4C 46 ## e_ident[EI_MAG0-3] ELF's magic number
|
||||||
02 ## e_ident[EI_CLASS] Indicating 64 bit
|
02 ## e_ident[EI_CLASS] Indicating 64 bit
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
.data
|
.data
|
||||||
# we must export the entry point to the ELF linker or loader.
|
# we must export the entry point to the ELF linker or loader.
|
||||||
# They convientionally recognize _start as their entry point.
|
# They convientionally recognize _start as their entry point.
|
||||||
|
|
|
@ -1,5 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
# Build new
|
# Build new
|
||||||
./bin/hex < hex0.hex |
|
./bin/hex < hex0.hex |
|
||||||
sponge bin/trial && ./bin/exec_enable bin/trial
|
sponge bin/trial && ./bin/exec_enable bin/trial
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include<stdlib.h>
|
#include<stdlib.h>
|
||||||
|
|
||||||
int main (int argc, char *argv[])
|
int main (int argc, char *argv[])
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
## ELF Header
|
## ELF Header
|
||||||
7F 45 4C 46 ## e_ident[EI_MAG0-3] ELF's magic number
|
7F 45 4C 46 ## e_ident[EI_MAG0-3] ELF's magic number
|
||||||
02 ## e_ident[EI_CLASS] Indicating 64 bit
|
02 ## e_ident[EI_CLASS] Indicating 64 bit
|
||||||
|
@ -68,4 +83,4 @@ eb 82 # jmp 600078 <_start>
|
||||||
30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 0A
|
30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 0A
|
||||||
|
|
||||||
## Where the byte we are reading is shoved
|
## Where the byte we are reading is shoved
|
||||||
00
|
00
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
.data
|
.data
|
||||||
# we must export the entry point to the ELF linker or loader.
|
# we must export the entry point to the ELF linker or loader.
|
||||||
# They convientionally recognize _start as their entry point.
|
# They convientionally recognize _start as their entry point.
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import ctypes
|
import ctypes
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import User_Interface as UI
|
import User_Interface as UI
|
||||||
|
|
||||||
print(UI.returnPage())
|
print(UI.returnPage())
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
if(window.location.href.indexOf("RUN") > -1) {
|
if(window.location.href.indexOf("RUN") > -1) {
|
||||||
setTimeout("location.reload(true);",500);
|
setTimeout("location.reload(true);",500);
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'TTY';
|
font-family: 'TTY';
|
||||||
src: url("Glass_TTY_VT220.ttf");
|
src: url("Glass_TTY_VT220.ttf");
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# :start
|
# :start
|
||||||
2D2B0001 # LOADUI R11 1 ; Our toggle
|
2D2B0001 # LOADUI R11 1 ; Our toggle
|
||||||
2D2D0600 # LOADUI R13 0x600 ; Where we are starting our Stack
|
2D2D0600 # LOADUI R13 0x600 ; Where we are starting our Stack
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
LOADUI R11 1 ; Our toggle
|
LOADUI R11 1 ; Our toggle
|
||||||
LOADUI R13 0x600 ; Where we are starting our Stack
|
LOADUI R13 0x600 ; Where we are starting our Stack
|
||||||
|
|
15
stage1/CAT.s
15
stage1/CAT.s
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
;; CAT program
|
;; CAT program
|
||||||
;; Concatinates multiple tapes into a single tape output
|
;; Concatinates multiple tapes into a single tape output
|
||||||
;; Read tapes in tape_01 and writes the assembled result
|
;; Read tapes in tape_01 and writes the assembled result
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
/****************************************
|
/****************************************
|
||||||
* Shitty Expensive Typewriter *
|
* Shitty Expensive Typewriter *
|
||||||
* A more shitty remake of the PDP-1's *
|
* A more shitty remake of the PDP-1's *
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
# ;; We will be using R13 for storage of Head
|
# ;; We will be using R13 for storage of Head
|
||||||
# ;; We will be using R14 for our condition codes
|
# ;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
;; We will be using R13 for storage of Head
|
;; We will be using R13 for storage of Head
|
||||||
;; We will be using R14 for our condition codes
|
;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# :start
|
# :start
|
||||||
2D2F0394 # LOADUI R15 $stack ; Put stack at end of program
|
2D2F0394 # LOADUI R15 $stack ; Put stack at end of program
|
||||||
# ;; We will be using R14 for our condition codes
|
# ;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
2D2F $stack # LOADUI R15 $stack ; Put stack at end of program
|
2D2F $stack # LOADUI R15 $stack ; Put stack at end of program
|
||||||
# ;; We will be using R14 for our condition codes
|
# ;; We will be using R14 for our condition codes
|
||||||
|
|
15
stage1/SET.s
15
stage1/SET.s
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
LOADUI R15 $stack ; Put stack at end of program
|
LOADUI R15 $stack ; Put stack at end of program
|
||||||
;; We will be using R14 for our condition codes
|
;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# :start
|
# :start
|
||||||
0D00002E # FALSE R14 ; R14 will be storing our current address
|
0D00002E # FALSE R14 ; R14 will be storing our current address
|
||||||
2D2F00e0 # LOADUI R15 $end ; We will be using R15 for our stack
|
2D2F00e0 # LOADUI R15 $end ; We will be using R15 for our stack
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
FALSE R14 ; R14 will be storing our current address
|
FALSE R14 ; R14 will be storing our current address
|
||||||
LOADUI R15 $end ; We will be using R15 for our stack
|
LOADUI R15 $end ; We will be using R15 for our stack
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# :start
|
# :start
|
||||||
2D22000a # LOADUI R2 10 ; We will be using R2 for our counter
|
2D22000a # LOADUI R2 10 ; We will be using R2 for our counter
|
||||||
# ;; Prep TAPE_01
|
# ;; Prep TAPE_01
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
LOADUI R2 10 ; We will be using R2 for our counter
|
LOADUI R2 10 ; We will be using R2 for our counter
|
||||||
;; Prep TAPE_01
|
;; Prep TAPE_01
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# start
|
# start
|
||||||
2D2A000f # LOADUI R10 0x0F ; Byte mask
|
2D2A000f # LOADUI R10 0x0F ; Byte mask
|
||||||
2D2B0001 # LOADUI R11 1 ; Our toggle
|
2D2B0001 # LOADUI R11 1 ; Our toggle
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
LOADUI R10 0x0F ; Byte mask
|
LOADUI R10 0x0F ; Byte mask
|
||||||
LOADUI R11 1 ; Our toggle
|
LOADUI R11 1 ; Our toggle
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# start
|
# start
|
||||||
2D2801e8 # LOADUI R8 @table ; Where we are putting our address pointers
|
2D2801e8 # LOADUI R8 @table ; Where we are putting our address pointers
|
||||||
2D2900ff # LOADUI R9 0xFF ; Byte mask
|
2D2900ff # LOADUI R9 0xFF ; Byte mask
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# start
|
# start
|
||||||
2D28 @z # LOADUI R8 @table ; Where we are putting our address pointers
|
2D28 @z # LOADUI R8 @table ; Where we are putting our address pointers
|
||||||
2D2900ff # LOADUI R9 0xFF ; Byte mask
|
2D2900ff # LOADUI R9 0xFF ; Byte mask
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
LOADUI R8 @table ; Where we are putting our address pointers
|
LOADUI R8 @table ; Where we are putting our address pointers
|
||||||
LOADUI R9 0xFF ; Byte mask
|
LOADUI R9 0xFF ; Byte mask
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# :start
|
# :start
|
||||||
2D2D040c # LOADUI R13 @table ; Where we are putting our table
|
2D2D040c # LOADUI R13 @table ; Where we are putting our table
|
||||||
# ;; We will be using R14 for our condition codes
|
# ;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# :start
|
# :start
|
||||||
:0
|
:0
|
||||||
2D2D @1 # LOADUI R13 @table ; Where we are putting our table
|
2D2D @1 # LOADUI R13 @table ; Where we are putting our table
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
2D2D @table # LOADUI R13 @table ; Where we are putting our table
|
2D2D @table # LOADUI R13 @table ; Where we are putting our table
|
||||||
# ;; We will be using R14 for our condition codes
|
# ;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
:start
|
:start
|
||||||
LOADUI R13 @table ; Where we are putting our table
|
LOADUI R13 @table ; Where we are putting our table
|
||||||
;; We will be using R14 for our condition codes
|
;; We will be using R14 for our condition codes
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lisp.h"
|
#include "lisp.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lisp.h"
|
#include "lisp.h"
|
||||||
|
|
||||||
struct cell *free_cells, *gc_block_start, *gc_block_end;
|
struct cell *free_cells, *gc_block_start, *gc_block_end;
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lisp.h"
|
#include "lisp.h"
|
||||||
|
|
||||||
/* Support functions */
|
/* Support functions */
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lisp.h"
|
#include "lisp.h"
|
||||||
|
|
||||||
void writeobj(FILE *ofp, struct cell* op)
|
void writeobj(FILE *ofp, struct cell* op)
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "lisp.h"
|
#include "lisp.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
;; Memory Space
|
;; Memory Space
|
||||||
;; 0 -> 512KB code -> Heap space [Heap pointer with malloc function]
|
;; 0 -> 512KB code -> Heap space [Heap pointer with malloc function]
|
||||||
;; 512KB -> 576KB Stack space 1 (Return Stack) [Pointed at by R15]
|
;; 512KB -> 576KB Stack space 1 (Return Stack) [Pointed at by R15]
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
;; A simple lisp with a precise garbage collector for cells
|
;; A simple lisp with a precise garbage collector for cells
|
||||||
;; Cells are in the following form:
|
;; Cells are in the following form:
|
||||||
;; Type (0), CAR (4), CDR (8), ENV (12)
|
;; Type (0), CAR (4), CDR (8), ENV (12)
|
||||||
|
|
16
tty.c
16
tty.c
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
16
vm.c
16
vm.c
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
|
|
||||||
/* Load program tape into Memory */
|
/* Load program tape into Memory */
|
||||||
|
|
16
vm.h
16
vm.h
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
16
vm_decode.c
16
vm_decode.c
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
uint32_t performance_counter;
|
uint32_t performance_counter;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
FILE* tape_01;
|
FILE* tape_01;
|
||||||
FILE* tape_02;
|
FILE* tape_02;
|
||||||
|
|
16
wrapper.c
16
wrapper.c
|
@ -1,3 +1,19 @@
|
||||||
|
/* This file is part of stage0.
|
||||||
|
*
|
||||||
|
* stage0 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* stage0 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
#define DEBUG true
|
#define DEBUG true
|
||||||
uint32_t performance_counter;
|
uint32_t performance_counter;
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# start:
|
# start:
|
||||||
# Let us first setup our stack
|
# Let us first setup our stack
|
||||||
BC0001 # mov sp,0x100
|
BC0001 # mov sp,0x100
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
BITS 16
|
BITS 16
|
||||||
;; Steps for building
|
;; Steps for building
|
||||||
;; nasm -o stage0_monitor stage0_monitor.s
|
;; nasm -o stage0_monitor stage0_monitor.s
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
BITS 16
|
BITS 16
|
||||||
;; Steps for building
|
;; Steps for building
|
||||||
;; nasm -o stage1_disk_copier stage1_disk_copier.s
|
;; nasm -o stage1_disk_copier stage1_disk_copier.s
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
BITS 16
|
BITS 16
|
||||||
;; Steps for building
|
;; Steps for building
|
||||||
;; nasm -o stage1_hex_compiler stage1_hex_compiler
|
;; nasm -o stage1_hex_compiler stage1_hex_compiler
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
BITS 16
|
BITS 16
|
||||||
;; Steps for building
|
;; Steps for building
|
||||||
;; nasm -o stage1_hex_editor stage1_hex_editor.s
|
;; nasm -o stage1_hex_editor stage1_hex_editor.s
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
## This file is part of stage0.
|
||||||
|
##
|
||||||
|
## stage0 is free software: you an redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## stage0 is distributed in the hope that it will be useful,
|
||||||
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
## GNU General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# start:
|
# start:
|
||||||
# Wait for user input before running
|
# Wait for user input before running
|
||||||
B400 # mov ah,0x0
|
B400 # mov ah,0x0
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
BITS 16
|
BITS 16
|
||||||
;; Steps for building
|
;; Steps for building
|
||||||
;; nasm -o stage1_loader stage1_loader.s
|
;; nasm -o stage1_loader stage1_loader.s
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
; This file is part of stage0.
|
||||||
|
;
|
||||||
|
; stage0 is free software: you can redistribute it and/or modify
|
||||||
|
; it under the terms of the GNU General Public License as published by
|
||||||
|
; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
; (at your option) any later version.
|
||||||
|
;
|
||||||
|
; stage0 is distributed in the hope that it will be useful,
|
||||||
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
; GNU General Public License for more details.
|
||||||
|
;
|
||||||
|
; You should have received a copy of the GNU General Public License
|
||||||
|
; along with stage0. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
BITS 16
|
BITS 16
|
||||||
;; Steps for building
|
;; Steps for building
|
||||||
;; nasm -o stage1_raw_writer stage1_raw_writer.s
|
;; nasm -o stage1_raw_writer stage1_raw_writer.s
|
||||||
|
|
Loading…
Reference in New Issue