Blitz-64: Code Files

14 December 2023
Back: www.Blitz64.org


• Directory Hierarchy

    blitz
       tools
          src
             kpl
          bin
          testing
       pgms
          asm2
          kpl2
          xv6
            UserCode
       MicroBlitz


• Example Programs

TicTacToe Game (KPL)
    Package Header: blitz/pgms/apps/TicTacToe.h
    Package Code: blitz/pgms/apps/TicTacToe.c
testUART (Assembly Code)
    blitz/pgms/testUART.s


• Tools

Assembler blitz/tools/src/asm.c
Linker blitz/tools/src/link.c
Emulator blitz/tools/src/blitz.c
Dump Object File blitz/tools/src/dumpobj.c
Hexify File blitz/tools/src/hexify.c
Create Library blitz/tools/src/createlib.c


• Additional Tool Files

Hexdump blitz/tools/src/hexdump.c
Check File blitz/tools/src/check.c
BlitzSupport blitz/tools/src/BlitzSupport.c
BlitzSupport2 blitz/tools/src/BlitzSupport2.c
Check Host Compatibility blitz/tools/src/CheckHostCompatibility.c
makefile blitz/tools/src/makefile


• KPL Compiler (C++ version)

main.h blitz/tools/src/kpl/main.h
main.cc blitz/tools/src/kpl/main.cc
ast.h blitz/tools/src/kpl/ast.h
ast.cc blitz/tools/src/kpl/ast.cc
lexer.cc blitz/tools/src/kpl/lexer.cc
parser.cc blitz/tools/src/kpl/parser.cc
printAST.cc blitz/tools/src/kpl/printAST.cc
mapping.cc blitz/tools/src/kpl/mapping.cc
check.cc blitz/tools/src/kpl/check.cc
gen.cc blitz/tools/src/kpl/gen.cc
ir.h blitz/tools/src/kpl/ir.h
ir.cc blitz/tools/src/kpl/ir.cc
opt.cc blitz/tools/src/kpl/opt.cc


• System Support

KPLSupport
    blitz/pgms/KPLSupport.h
    blitz/pgms/KPLSupport.c
BasicSystem
    blitz/pgms/BasicSystem.h
    blitz/pgms/BasicSystem.c
HostInterface
    blitz/pgms/HostInterface.h
    blitz/pgms/HostInterface.c
PrintPackage
    blitz/pgms/PrintPackage.h
    blitz/pgms/PrintPackage.c
Number
    blitz/pgms/Number.h
    blitz/pgms/Number.c
RBTree
    blitz/pgms/RBTree.h
    blitz/pgms/RBTree.c
List
    blitz/pgms/List.h
    blitz/pgms/List.c
List2
    blitz/pgms/List2.h
    blitz/pgms/List2.c
List3
    blitz/pgms/List3.h
    blitz/pgms/List3.c
Assembly Files
    blitz/pgms/KPLRuntime.s
    blitz/pgms/GlobalTrapHandler.s
    blitz/pgms/BasicEntry.s
    blitz/pgms/BasicRuntime.s
    blitz/pgms/testUART.s
    blitz/pgms/boot0.s


• KPL Compiler (KPL version)

KPLMain Package
    blitz/pgms/kpl2/KPLMain.h
    blitz/pgms/kpl2/KPLMain.c
KPLBasic Package
    blitz/pgms/kpl2/KPLBasic.h
    blitz/pgms/kpl2/KPLBasic.c
KPLLexer Package
    blitz/pgms/kpl2/KPLLexer.h
    blitz/pgms/kpl2/KPLLexer.c
KPLAst Package
    blitz/pgms/kpl2/KPLAst.h
    blitz/pgms/kpl2/KPLAst.c
KPLParser Package
    blitz/pgms/kpl2/KPLParser.h
    blitz/pgms/kpl2/KPLParser.c
KPLPrintAst Package
    blitz/pgms/kpl2/KPLPrintAst.h
    blitz/pgms/kpl2/KPLPrintAst.c
KPLCheck Package
    blitz/pgms/kpl2/KPLCheck.h
    blitz/pgms/kpl2/KPLCheck.c
KPLGen Package
    blitz/pgms/kpl2/KPLGen.h
    blitz/pgms/kpl2/KPLGen.c


• Assembler (KPL version)

KPLMain Package
    blitz/pgms/asm2/asm2.h
    blitz/pgms/asm2/asm2.c


• Misc Demo Programs (KPL code)

TicTacToe
    blitz/pgms/apps/TicTacToe.h
    blitz/pgms/apps/TicTacToe.c
BitMap
    blitz/pgms/apps/BitMap.h
    blitz/pgms/apps/BitMap.c
chess
    blitz/pgms/apps/chess.h
    blitz/pgms/apps/chess.c
CacheTest
    blitz/pgms/apps/CacheTest.h
    blitz/pgms/apps/CacheTest.c
Echo
    blitz/pgms/apps/Echo.h
    blitz/pgms/apps/Echo.c
    blitz/pgms/apps/Echo.s     (example of compiler-generated assembly)
ed0
    blitz/pgms/apps/ed0.h
    blitz/pgms/apps/ed0.c
ExamGrader
    blitz/pgms/apps/ExamGrader.h
    blitz/pgms/apps/ExamGrader.c
hexdump
    blitz/pgms/apps/hexdump.h
    blitz/pgms/apps/hexdump.c
ListTester
    blitz/pgms/apps/ListTester.h
    blitz/pgms/apps/ListTester.c
ListTester23
    blitz/pgms/apps/ListTester23.h
    blitz/pgms/apps/ListTester23.c
NumberTest
    blitz/pgms/apps/NumberTest.h
    blitz/pgms/apps/NumberTest.c
Quicksort
    blitz/pgms/apps/Quicksort.h
    blitz/pgms/apps/Quicksort.c
RBTester
    blitz/pgms/apps/RBTester.h
    blitz/pgms/apps/RBTester.c
RelaySim
    blitz/pgms/apps/RelaySim.h
    blitz/pgms/apps/RelaySim.c
Sudoku
    blitz/pgms/apps/Sudoku.h
    blitz/pgms/apps/Sudoku.c


• xv6 Operating System

The Kernel

The xv6 Kernel
    blitz/pgms/xv6/xv6.h
    blitz/pgms/xv6/xv6.c
fs
    blitz/pgms/xv6/fs.h
    blitz/pgms/xv6/fs.c
syscall
    blitz/pgms/xv6/syscall.h
    blitz/pgms/xv6/syscall.c
makeUsys
    blitz/pgms/xv6/makeUsys.h
    blitz/pgms/xv6/makeUsys.c
mkfs
    blitz/pgms/xv6/mkfs.h
    blitz/pgms/xv6/mkfs.c
assemby code
    blitz/pgms/xv6/entry.s
    blitz/pgms/xv6/initcode.s
Misc
    blitz/pgms/xv6/README-BLITZ
    blitz/pgms/xv6/README-RISCV
    blitz/pgms/xv6/RISCV-LICENSE
    blitz/pgms/xv6/emulationParms
    blitz/pgms/xv6/makefile

User-Mode Programs

Hello World Program
    blitz/pgms/xv6/UserCode/hello.h
    blitz/pgms/xv6/UserCode/hello.c
TicTacToe
    blitz/pgms/xv6/UserCode/TicTacToe.h
    blitz/pgms/xv6/UserCode/TicTacToe.c
sh - Shell Program
    blitz/pgms/xv6/UserCode/sh.h
    blitz/pgms/xv6/UserCode/sh.c
cat
    blitz/pgms/xv6/UserCode/cat.h
    blitz/pgms/xv6/UserCode/cat.c
rm
    blitz/pgms/xv6/UserCode/rm.h
    blitz/pgms/xv6/UserCode/rm.c
mkdir
    blitz/pgms/xv6/UserCode/mkdir.h
    blitz/pgms/xv6/UserCode/mkdir.c
echo
    blitz/pgms/xv6/UserCode/echo.h
    blitz/pgms/xv6/UserCode/echo.c
ls
    blitz/pgms/xv6/UserCode/ls.h
    blitz/pgms/xv6/UserCode/ls.c
ln
    blitz/pgms/xv6/UserCode/ln.h
    blitz/pgms/xv6/UserCode/ln.c
grep
    blitz/pgms/xv6/UserCode/grep.h
    blitz/pgms/xv6/UserCode/grep.c
wc
    blitz/pgms/xv6/UserCode/wc.h
    blitz/pgms/xv6/UserCode/wc.c
kill
    blitz/pgms/xv6/UserCode/kill.h
    blitz/pgms/xv6/UserCode/kill.c
The "init" Process
    blitz/pgms/xv6/UserCode/init.h
    blitz/pgms/xv6/UserCode/init.c
Support Code
    blitz/pgms/xv6/UserCode/UserSystem.h
    blitz/pgms/xv6/UserCode/UserSystem.c
    blitz/pgms/xv6/UserCode/UserRuntime.s
    blitz/pgms/xv6/UserCode/usys.s
Testing and Validation
    blitz/pgms/xv6/UserCode/stressfs.h
    blitz/pgms/xv6/UserCode/stressfs.c

    blitz/pgms/xv6/UserCode/grind.h
    blitz/pgms/xv6/UserCode/grind.c

    blitz/pgms/xv6/UserCode/zombie.h
    blitz/pgms/xv6/UserCode/zombie.c

    blitz/pgms/xv6/UserCode/usertests.h
    blitz/pgms/xv6/UserCode/usertests.c

    blitz/pgms/xv6/UserCode/forktest.h
    blitz/pgms/xv6/UserCode/forktest.c

    blitz/pgms/xv6/UserCode/testout.h
    blitz/pgms/xv6/UserCode/testout.c


• MicroBlitz (FPGA core)

MicroBlitz.sv
    blitz/MicroBlitz/MicroBlitz.sv
UARTModules.sv
    blitz/MicroBlitz/UARTmodules.sv
op_codes.svh
    blitz/MicroBlitz/op_codes.svh
SecondLevelMain.sv
    blitz/MicroBlitz/SecondLevelMain.sv
MB_TestBench.sv
    blitz/MicroBlitz/MB_TestBench.sv
MBBooter.s
    blitz/MicroBlitz/MBBooter.s
ISAValidator.s
    blitz/MicroBlitz/ISAValidator.s
MBEcho.s
    blitz/MicroBlitz/MBEcho.s
MMUTester.s
    blitz/MicroBlitz/MMUTester.s