mirror of
https://github.com/Ed94/perfaware.git
synced 2025-07-02 20:01:06 -07:00
Configured the project to begin working on part one.
This commit is contained in:
7
part_1/build.bat
Normal file
7
part_1/build.bat
Normal file
@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
if not exist build\nul (
|
||||
meson setup build
|
||||
)
|
||||
|
||||
ninja -C build
|
13
part_1/clean.bat
Normal file
13
part_1/clean.bat
Normal file
@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
|
||||
if exist build\nul (
|
||||
@RD /S /Q "build"
|
||||
)
|
||||
|
||||
if exist tests\listing_0037_single_register_mov (
|
||||
DEL /Q tests\listing_0037_single_register_mov
|
||||
)
|
||||
|
||||
if exist tests\listing_0038_many_register_mov (
|
||||
DEL /Q tests\listing_0038_many_register_mov
|
||||
)
|
5
part_1/meson.build
Normal file
5
part_1/meson.build
Normal file
@ -0,0 +1,5 @@
|
||||
project( 'sim_8086', 'c', 'cpp' )
|
||||
|
||||
include_thirdparty = include_directories( '../thirdparty' )
|
||||
|
||||
executable( 'sim_8086', 'sim_8086.c', include_directories : include_thirdparty )
|
12
part_1/sim_8086.c
Normal file
12
part_1/sim_8086.c
Normal file
@ -0,0 +1,12 @@
|
||||
#define ZPL_IMPLEMENTATION
|
||||
#include "zpl.h"
|
||||
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
zpl_printf("sim 8086!");
|
||||
|
||||
return 0;
|
||||
}
|
8
part_1/test.bat
Normal file
8
part_1/test.bat
Normal file
@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
|
||||
echo Assembling: listing_0037_single_register_mov.asm
|
||||
call nasm ".\tests\listing_0037_single_register_mov.asm"
|
||||
|
||||
|
||||
echo Assembling: listing_0038_many_register_mov.asm
|
||||
call nasm ".\tests\listing_0038_many_register_mov.asm"
|
19
part_1/tests/listing_0037_single_register_mov.asm
Normal file
19
part_1/tests/listing_0037_single_register_mov.asm
Normal file
@ -0,0 +1,19 @@
|
||||
; ========================================================================
|
||||
;
|
||||
; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved.
|
||||
;
|
||||
; This software is provided 'as-is', without any express or implied
|
||||
; warranty. In no event will the authors be held liable for any damages
|
||||
; arising from the use of this software.
|
||||
;
|
||||
; Please see https://computerenhance.com for further information
|
||||
;
|
||||
; ======================================================================== */
|
||||
|
||||
; ========================================================================
|
||||
; LISTING 37
|
||||
; ========================================================================
|
||||
|
||||
bits 16
|
||||
|
||||
mov cx, bx
|
29
part_1/tests/listing_0038_many_register_mov.asm
Normal file
29
part_1/tests/listing_0038_many_register_mov.asm
Normal file
@ -0,0 +1,29 @@
|
||||
; ========================================================================
|
||||
;
|
||||
; (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved.
|
||||
;
|
||||
; This software is provided 'as-is', without any express or implied
|
||||
; warranty. In no event will the authors be held liable for any damages
|
||||
; arising from the use of this software.
|
||||
;
|
||||
; Please see https://computerenhance.com for further information
|
||||
;
|
||||
; ======================================================================== */
|
||||
|
||||
; ========================================================================
|
||||
; LISTING 38
|
||||
; ========================================================================
|
||||
|
||||
bits 16
|
||||
|
||||
mov cx, bx
|
||||
mov ch, ah
|
||||
mov dx, bx
|
||||
mov si, bx
|
||||
mov bx, di
|
||||
mov al, cl
|
||||
mov ch, ch
|
||||
mov bx, ax
|
||||
mov bx, si
|
||||
mov sp, di
|
||||
mov bp, ax
|
Reference in New Issue
Block a user