Some more prep

This commit is contained in:
ed
2026-08-06 21:10:04 -04:00
parent ac1fffa422
commit 6feff68b33
8 changed files with 50 additions and 15 deletions
+1
View File
@@ -1 +1,2 @@
build build
course_content
+7
View File
@@ -0,0 +1,7 @@
# Computer Enhance: Performance Aware Programming Course
```
git -C . config --local diff.ignoreSubmodules all
git -C . config --local status.submoduleSummary false
git -C . config --local submodule.recurse false
```
+1
View File
@@ -2,6 +2,7 @@
# pragma once # pragma once
# include "dsl.h" # include "dsl.h"
# include "memory.h" # include "memory.h"
# include "analysis.h"
#endif #endif
#pragma region Hashing #pragma region Hashing
+1
View File
@@ -3,6 +3,7 @@
# include "dsl.h" # include "dsl.h"
# include "memory.h" # include "memory.h"
# include "hashing.h" # include "hashing.h"
# include "analysis.h"
#endif #endif
#pragma region Key Table Linear (KTL) #pragma region Key Table Linear (KTL)
+1
View File
@@ -4,6 +4,7 @@
# include "memory.h" # include "memory.h"
# include "hashing.h" # include "hashing.h"
# include "tables.h" # include "tables.h"
# include "analysis.h"
#endif #endif
// NOTE(rjf): Includes reverses for uppercase and lowercase hex. // NOTE(rjf): Includes reverses for uppercase and lowercase hex.
+26 -15
View File
@@ -52,6 +52,10 @@ WinAPI B4 ms_write_console(
U4_V chars_written, U4_V chars_written,
U8 reserved U8 reserved
) asm("WriteConsoleA"); ) asm("WriteConsoleA");
WinAPI void* ms_create_file_a(char const* lpFileName, U4 dwDesiredAccess, U4 dwShareMode, void* lpSecurityAttributes, U4 dwCreationDisposition, U4 dwFlagsAndAttributes, void* hTemplateFile) asm("CreateFileA");
WinAPI B4 ms_write_file(void* hFile, void const* lpBuffer, U4 nNumberOfBytesToWrite, U4* lpNumberOfBytesWritten, void* lpOverlapped) asm("WriteFile");
WinAPI B4 ms_read_file(void* hFile, void* lpBuffer, U4 nNumberOfBytesToRead, U4* lpNumberOfBytesRead, void* lpOverlapped) asm("ReadFile");
WinAPI B4 ms_close_handle(void* hObject) asm("CloseHandle");
// --- User32 --- // --- User32 ---
WinAPI U2 ms_register_class_a(MS_WNDCLASSA const* lpWndClass) asm("RegisterClassA"); WinAPI U2 ms_register_class_a(MS_WNDCLASSA const* lpWndClass) asm("RegisterClassA");
@@ -106,17 +110,24 @@ WinAPI void* ms_create_compatible_bitmap(void* hdc, S4 cx, S4 cy) asm
WinAPI B4 ms_bit_blt(void* hdcDest, S4 x, S4 y, S4 w, S4 h, void* hdcSrc, S4 xSrc, S4 ySrc, U4 rop) asm("BitBlt"); WinAPI B4 ms_bit_blt(void* hdcDest, S4 x, S4 y, S4 w, S4 h, void* hdcSrc, S4 xSrc, S4 ySrc, U4 rop) asm("BitBlt");
WinAPI B4 ms_delete_dc(void* hdc) asm("DeleteDC"); WinAPI B4 ms_delete_dc(void* hdc) asm("DeleteDC");
WinAPI B4 ms_get_client_rect(void* hwnd, MS_RECT* lpRect) asm("GetClientRect"); WinAPI B4 ms_get_client_rect(void* hwnd, MS_RECT* lpRect) asm("GetClientRect");
WinAPI void* ms_select_object(void* hdc, void* h) asm("SelectObject"); WinAPI void* ms_select_object(void* hdc, void* h) asm("SelectObject");
WinAPI S4 ms_rectangle(void* hdc, S4 left, S4 top, S4 right, S4 bottom) asm("Rectangle"); WinAPI S4 ms_rectangle(void* hdc, S4 left, S4 top, S4 right, S4 bottom) asm("Rectangle");
WinAPI S4 ms_set_bk_mode(void* hdc, S4 mode) asm("SetBkMode"); WinAPI S4 ms_set_bk_mode(void* hdc, S4 mode) asm("SetBkMode");
WinAPI void* ms_create_solid_brush(U4 color) asm("CreateSolidBrush"); WinAPI void* ms_create_solid_brush(U4 color) asm("CreateSolidBrush");
WinAPI S4 ms_delete_object(void* ho) asm("DeleteObject"); WinAPI S4 ms_delete_object(void* ho) asm("DeleteObject");
enum { enum {
MS_GENERIC_READ = 0x80000000,
MS_GENERIC_WRITE = 0x40000000,
MS_CREATE_ALWAYS = 2,
MS_OPEN_EXISTING = 3,
MS_FILE_ATTRIBUTE_NORMAL = 0x80,
MS_MEM_COMMIT = 0x00001000, MS_MEM_COMMIT = 0x00001000,
MS_MEM_RESERVE = 0x00002000, MS_MEM_RESERVE = 0x00002000,
MS_PAGE_READWRITE = 0x04, MS_PAGE_READWRITE = 0x04,
MS_SRCCOPY = 0x00CC0020, MS_SRCCOPY = 0x00CC0020,
MS_WM_DESTROY = 0x0002, MS_WM_DESTROY = 0x0002,
MS_WM_SIZE = 0x0005, MS_WM_SIZE = 0x0005,
MS_WM_PAINT = 0x000F, MS_WM_PAINT = 0x000F,
@@ -133,26 +144,26 @@ enum {
MS_WM_MOUSEWHEEL = 0x020A, MS_WM_MOUSEWHEEL = 0x020A,
MS_WS_OVERLAPPEDWINDOW = 0x00CF0000, MS_WS_OVERLAPPEDWINDOW = 0x00CF0000,
MS_WS_VISIBLE = 0x10000000, MS_WS_VISIBLE = 0x10000000,
MS_VK_LEFT = 0x25,
MS_VK_UP = 0x26,
MS_VK_RIGHT = 0x27,
MS_VK_DOWN = 0x28,
MS_PAGE_EXECUTE_READWRITE = 0x40, MS_PAGE_EXECUTE_READWRITE = 0x40,
MS_WM_CHAR = 0x0102,
MS_VK_RETURN = 0x0D,
MS_VK_BACK = 0x08, MS_VK_BACK = 0x08,
MS_VK_TAB = 0x09, MS_VK_TAB = 0x09,
MS_VK_RETURN = 0x0D,
MS_VK_SHIFT =0x10,
MS_VK_SPACE = 0x20, MS_VK_SPACE = 0x20,
MS_VK_F5 = 0x74,
MS_VK_PRIOR = 0x21, MS_VK_PRIOR = 0x21,
MS_VK_NEXT = 0x22, MS_VK_NEXT = 0x22,
MS_VK_LEFT = 0x25,
MS_VK_SHIFT =0x10, MS_VK_UP = 0x26,
MS_VK_RIGHT = 0x27,
MS_VK_DOWN = 0x28,
MS_VK_F1 = 0x70,
MS_VK_F2 = 0x71,
MS_VK_F5 = 0x74,
MS_WM_CHAR = 0x0102,
}; };
#if BUILD_DEBUG #if BUILD_DEBUG
FI_ void assert(U8 cond) { if(cond){return;} else{debug_trap(); ms_exit_process(1);} } FI_ void assert(U8 cond) { if(cond){return;} else{debug_trap(); ms_exit_process(1);} }
#endif #endif
+4
View File
@@ -3,8 +3,12 @@
#include "duffle/memory.h" #include "duffle/memory.h"
#include "duffle/win32.h" #include "duffle/win32.h"
int main() int main()
{ {
ms_exit_process(0); ms_exit_process(0);
return 0; return 0;
} }
+9
View File
@@ -0,0 +1,9 @@
// raddbg 0.9.28 project file
target:
{
executable: "build/sim_8086.exe"
working_directory: "build/"
enabled: 1
label: "Sim 8086"
}