WKern
Loading...
Searching...
No Matches
testexec.c
Go to the documentation of this file.
1
/*
2
WKern - A Bare Metal OS / Kernel I am maKing (For Fun)
3
Copyright (C) 2025 Wdboyes13
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <https://www.gnu.org/licenses/>.
17
*/
18
19
// This is a test executable of the WEX format
20
// The data would be in an actual file normally
21
// This is just an array to simulate it
22
static
unsigned
char
exec[] = {
23
0x06, 0x04,
// Entry point = 0x06, Symbol Table Size = 4
24
0x0A, 0x0C, 0x0D, 0x01,
// Symbol Table: [0]=Write, [1]=Shutdown, [2]=Sleep,
25
// [3]=CLS
26
27
0x00, 0x03,
// CALL CLS (smt[3] = 0x01)
28
0x00, 0x00,
'H'
,
'E'
,
'L'
,
'L'
,
'O'
,
'\n'
, 0x00, 0x00,
29
0x02,
// CALL SLEEP (smt[2] = 0x0D)
30
0x00, 0x01,
// CALL SHUTDOWN (smt[1] = 0x0C)
31
32
0xFF
// End of program
33
};
34
unsigned
char
*
Execr
() {
return
exec; }
Execr
unsigned char * Execr()
Definition
testexec.c:34
src
wex
testexec.c
Generated on
for WKern by
1.14.0