diff --git a/KernelRoutineList.txt b/KernelRoutineList.txt new file mode 100644 index 0000000..360a782 --- /dev/null +++ b/KernelRoutineList.txt @@ -0,0 +1,68 @@ +Kernel Routines Grouped +(everything NOT starting with "+-", are "wants") + + + +Char.s + + +Event_Handler.s + + +Hardware.s + | + +- vram_write + +- vram_write_color + +- vram_read + +- vram_dump + +Int.s + + +Irq.s + | + +- irq + +Keyboard.s + + +Memory_Manager.s + + Software Stack: + (for A, X and Y) + push + pop + + + Maybe also: External Fragmantation + or: Variable houskeeping in a List of pointers + +String.s + + to lower + to upper + count + flip + contains + equals + trim + +Video.s + | + +- video_write + +- video_write_static + +- video_writeline + +- video_writeline_static + +- video_set_color + +- video_set_foreground + +- video_set_background + +- video_read_line + +- video_read_char + +- video_set_cursor + +- video_get_cursor + +- video_return + +- video_scroll + +- video_clear + +- video_reset_color + +- video_reset + +- video_load_font \ No newline at end of file diff --git a/lib/kernel.s b/lib/kernel.s deleted file mode 100644 index 8957e4e..0000000 --- a/lib/kernel.s +++ /dev/null @@ -1,13 +0,0 @@ - .include "lib/src/irq.s" - .include "lib/src/keyboard.s" - .include "lib/src/video.s" - .include "lib/src/string.s" - .include "lib/src/int.s" - - - - -kernel_init - rts - - \ No newline at end of file diff --git a/main.s b/main.s index 4d275d9..3621363 100644 --- a/main.s +++ b/main.s @@ -1,8 +1,8 @@ - .include "lib/variables.s" + .include "src/variables.s" .org $c000 ; $c000 for 16k ROM - .include "lib/kernel.s" + .include "src/kernel.s" .org $f700 diff --git a/src/kernel.s b/src/kernel.s new file mode 100644 index 0000000..b7ecc36 --- /dev/null +++ b/src/kernel.s @@ -0,0 +1,13 @@ + .include "src/kernel/irq.s" + .include "src/kernel/keyboard.s" + .include "src/kernel/video.s" + .include "src/kernel/string.s" + .include "src/kernel/int.s" + .include "src/kernel/event_handler.s" + .include "src/kernel/memory_manager.s" + .include "src/kernel/hardware.s" + +kernel_init + rts + + \ No newline at end of file diff --git a/lib/src/char.s b/src/kernel/char.s similarity index 100% rename from lib/src/char.s rename to src/kernel/char.s diff --git a/lib/src/event_handler.s b/src/kernel/event_handler.s similarity index 100% rename from lib/src/event_handler.s rename to src/kernel/event_handler.s diff --git a/lib/src/hardware.s b/src/kernel/hardware.s similarity index 90% rename from lib/src/hardware.s rename to src/kernel/hardware.s index 7b6ae5c..1f1ef2d 100644 --- a/lib/src/hardware.s +++ b/src/kernel/hardware.s @@ -9,9 +9,12 @@ vram_write ; Y => Y Coordinate ; Output: (none) + + + rts -;vram_write_color +vram_write_color ; VRAM Write Color ; Writes A to the given Coordinate, but adds 0x40 to X @@ -23,6 +26,8 @@ vram_write ; Output: (none) + rts + vram_read ; VRAM Read ; Reads Data from the given Coordinate @@ -35,6 +40,8 @@ vram_read ; A <= Data + rts + vram_dump ; VRAM Dump ; Dumps all bytes from VRAM in the given Range @@ -48,4 +55,7 @@ vram_dump ; K3 => LOW Memory Pointer ; K4 => HIGH Memory Pointer - ; Output: (none) \ No newline at end of file + ; Output: (none) + + + rts \ No newline at end of file diff --git a/lib/src/int.s b/src/kernel/int.s similarity index 100% rename from lib/src/int.s rename to src/kernel/int.s diff --git a/lib/src/irq.s b/src/kernel/irq.s similarity index 100% rename from lib/src/irq.s rename to src/kernel/irq.s diff --git a/lib/src/keyboard.s b/src/kernel/keyboard.s similarity index 100% rename from lib/src/keyboard.s rename to src/kernel/keyboard.s diff --git a/lib/src/memory_manager.s b/src/kernel/memory_manager.s similarity index 100% rename from lib/src/memory_manager.s rename to src/kernel/memory_manager.s diff --git a/lib/src/string.s b/src/kernel/string.s similarity index 100% rename from lib/src/string.s rename to src/kernel/string.s diff --git a/lib/src/video.s b/src/kernel/video.s similarity index 95% rename from lib/src/video.s rename to src/kernel/video.s index 6959bc7..64df91a 100644 --- a/lib/src/video.s +++ b/src/kernel/video.s @@ -168,7 +168,6 @@ video_scroll ; +---- 0 = Scroll Text Video Buffer (Y 0 - 31) (4k) ; 1 = Scroll Entire Video Buffer (Y 0 - 255) (32k) - ; I.E => 0x03 (0b00001011) => Scrolls Entire Videobuffer Right & Up and ; Disposes "scrolled away" content. Fills gaps with empty cells @@ -205,4 +204,14 @@ video_reset rts video_load_font + ; Video Load Font + ; Loads a 2k BitMap font from a Pointer to VRAM + ; Input: + ; X => LOW Memory Pointer + ; Y => HIGH Memory Pointer + + ; Output: (none) + + + rts \ No newline at end of file diff --git a/monitor.s b/src/monitor.s similarity index 100% rename from monitor.s rename to src/monitor.s diff --git a/lib/variables.s b/src/variables.s similarity index 97% rename from lib/variables.s rename to src/variables.s index 3f541d5..4f627f2 100644 --- a/lib/variables.s +++ b/src/variables.s @@ -42,5 +42,5 @@ soft_system_register = $21d ; 8 bit (internal) color = $2fe ; 8 bit Fore & Background Color typelength = $2ff ; 8 bit Length of typebuffer -typebuffer = $300 ; 256 bit 256 bit, All Purpose Char Buffer +typebuffer = $300 ; 256 byte 256 bit, All Purpose Char Buffer