Skip to content

Commit 5122274

Browse files
committed
update
1 parent e39acb9 commit 5122274

File tree

10 files changed

+103
-70
lines changed

10 files changed

+103
-70
lines changed

build/bin/kernel.map

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Discarded input sections
1313
.eh_frame 0x00000000 0x58 T:/a/WelcomeBackOS/build/obj/coff/pe.o
1414
.eh_frame 0x00000000 0x13c T:/a/WelcomeBackOS/build/obj/coff/wm.o
1515
.eh_frame 0x00000000 0x21c T:/a/WelcomeBackOS/build/obj/coff/kheap.o
16+
.eh_frame 0x00000000 0xa8 T:/a/WelcomeBackOS/build/obj/coff/pe_loader.o
1617
.eh_frame 0x00000000 0x40 T:/a/WelcomeBackOS/build/obj/coff/ksymbol_table.o
1718
.gcc_except_table
1819
0x00000000 0x4 T:/a/WelcomeBackOS/build/obj/coff/cpp_runtime.o
@@ -289,15 +290,15 @@ Linker script and memory map
289290
.text 0x000865c0 0x288 T:/a/WelcomeBackOS/build/obj/coff/elf_loader.o
290291
0x000865c0 elf32_load_nomap
291292
.text 0x00086848 0x1fc T:/a/WelcomeBackOS/build/obj/coff/pe_loader.o
292-
0x00086848 pe32_load
293-
0x000869ca pe32_start_user
294-
0x000869f0 test_app
293+
0x00086848 pe32_load(iso_file*, pe_user_image_t*)
294+
0x000869ca pe32_start_user(pe_user_image_t const*)
295+
0x000869f0 test_app()
295296
*fill* 0x00086a44 0xc
296297
.text 0x00086a50 0x50 T:/a/WelcomeBackOS/build/obj/coff/clear_screen.o
297298
0x00086a50 clear_screen
298299
.text 0x00086aa0 0xc T:/a/WelcomeBackOS/build/obj/coff/ksymbol_table.o
299-
0x00086aa0 get_kernel_symbol_list
300-
0x00086aa6 get_kernel_symbol_count
300+
0x00086aa0 get_kernel_symbol_list()
301+
0x00086aa6 get_kernel_symbol_count()
301302
.text 0x00086aac 0x94 T:/a/WelcomeBackOS/build/obj/coff/cpp_runtime.o
302303
0x00086aac operator new(unsigned int)
303304
0x00086acf operator delete(void*)

build/dep/coff/pe_loader.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
T:/a/WelcomeBackOS/build/obj/coff/pe_loader.s: \
2-
T:/a/WelcomeBackOS/src/kernel/loader/pe/pe_loader.c \
2+
T:/a/WelcomeBackOS/src/kernel/loader/pe/pe_loader.cc \
33
T:/a/WelcomeBackOS/src/kernel/include/stdint.h \
44
T:/a/WelcomeBackOS/src/kernel/include/proto.h \
55
T:/a/WelcomeBackOS/src/kernel/include/stdint.h \

src/kernel/boot/boot2.asm

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
call print_base_str
2222
%endmacro
2323

24+
%macro PRINT_HINT 2
25+
mov di, (%1*80 + 8)*2
26+
mov si, %2
27+
mov bl, 0x4F
28+
call print_base_str
29+
%endmacro
30+
2431
BITS 16
2532
ORG 0x0500 ; Stage1 springt nach 0000:0500
2633

@@ -75,7 +82,10 @@ boot_menu:
7582

7683
mov ax, 0xB800
7784
mov es, ax
78-
85+
86+
; hinweis
87+
PRINT_HINT 1, note_str
88+
7989
; menu bar
8090
mov di, (0*80 + 0) * 2
8191
mov ax, 0x07DB
@@ -439,6 +449,22 @@ print_base_str:
439449
.endeDBstr:
440450
ret
441451

452+
print_hint_str:
453+
push cs
454+
pop ds
455+
mov ax, 0xB800
456+
mov es, ax
457+
mov ah, bl
458+
cld
459+
.loop2:
460+
lodsb
461+
test al, al
462+
jz .endeDCstr
463+
stosw
464+
jmp .loop2
465+
.endeDCstr:
466+
ret
467+
442468
; ------------------------------------------------------------
443469
; UI: Fill screen with char in AL and attr in AH
444470
; ------------------------------------------------------------
@@ -935,6 +961,8 @@ msgDBASEvesa1024x728: db " Start dBase 2026 Graphics-Mode 1024x728 ... ", 0
935961
msgDBASE: db " -=< dBASE 2026 >=- ",0
936962
msgDBASEenv: db " Choose your Favorite Environment ", 0
937963

964+
note_str: db "Hint: You have to do tripple press ENTER-Key, to select Env ! ", 0
965+
938966
share1: db " ____ _ _ _ ____ _____ _ _ _ ____ _____ ", 0
939967
share2: db " / ___|| | | | / \ | _ \| ____| | | | | / \ | _ \| ____| ", 0
940968
share3: db " \___ \| |_| | / _ \ | |_) | _| | |/\| | / _ \ | |_) | _| ", 0

src/kernel/include/ksymbol_table.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ typedef struct {
2121
uint16_t func_sig; // signature as id
2222
} kernel_symbol_t;
2323

24-
extern "C" kernel_symbol_t* get_kernel_symbol_list (void);
25-
extern "C" uint32_t get_kernel_symbol_count(void);
24+
extern kernel_symbol_t* get_kernel_symbol_list (void);
25+
extern uint32_t get_kernel_symbol_count(void);
2626

2727
#ifdef IMPORT
2828

src/kernel/include/stdint.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ typedef int INT;
5656

5757
# define UINT_MAX 4294967295U
5858

59+
#ifdef __cplusplus
60+
# define NULL nullptr
61+
#else
5962
# define NULL (void*)0
60-
63+
#endif // __cplusplus
6164
#endif // __STDINT_H__

src/kernel/ksymbol_table.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ static const uint32_t kernel_symbols_count =
2222
(uint32_t)(sizeof(kernel_symbols) /
2323
sizeof(kernel_symbols[0]));
2424

25-
extern "C" kernel_symbol_t* get_kernel_symbol_list(void) {
25+
kernel_symbol_t* get_kernel_symbol_list(void) {
2626
return kernel_symbols;
2727
}
2828

29-
extern "C" uint32_t get_kernel_symbol_count(void) {
29+
uint32_t get_kernel_symbol_count(void) {
3030
return kernel_symbols_count;
3131
}

src/kernel/shell_loader.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extern int gfx_init(void);
2121
extern "C" void shell_main(void);
2222
extern "C" void mouse_poll(void);
2323
extern "C" int mouse_install(void);
24-
extern "C" void test_app(void);
24+
extern void test_app(void);
2525

2626
//extern void wm_init(int,int,uint32_t,int);
2727

src/user32/TurboVision/inc/Hardware.h

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,58 +21,57 @@
2121
((long)(((unsigned)(l)) | (((long)((unsigned)(h))) << 16)))
2222
#endif
2323

24-
class THardwareInfo {
25-
public:
26-
THardwareInfo() noexcept;
27-
~THardwareInfo();
24+
namespace tvision {
25+
class THardwareInfo {
26+
public:
27+
THardwareInfo();
28+
~THardwareInfo();
2829

29-
// screen functions
30-
static uint16_t getScreenRows(void) noexcept;
31-
static uint16_t getScreenCols(void) noexcept;
30+
// screen functions
31+
static uint16_t getScreenRows(void);
32+
static uint16_t getScreenCols(void);
3233

33-
static uint16_t* getColorAddr(void) noexcept;
34-
static uint16_t* getMonoAddr (void) noexcept;
35-
36-
void cursorOn (void) noexcept;
37-
void cursorOff(void) noexcept;
38-
39-
static uint32_t getTickCount(void) noexcept;
40-
static uint32_t getTickCountMs(void) noexcept;
41-
private:
42-
static uint16_t colorSel;
43-
static uint16_t monoSel ;
44-
static uint16_t biosSel ;
45-
};
34+
static uint16_t* getColorAddr(uint16_t);
35+
static uint16_t* getMonoAddr (uint16_t);
36+
37+
void cursorOn (void);
38+
void cursorOff(void);
39+
40+
static uint32_t getTickCount (void);
41+
static uint32_t getTickCountMs(void);
42+
private:
43+
static uint16_t colorSel;
44+
static uint16_t monoSel ;
45+
static uint16_t biosSel ;
46+
};
4647

47-
inline uint32_t THardwareInfo::getTickCount() noexcept {
48-
return *(uint32_t *) MAKELONG( biosSel, 0x6C );
49-
}
50-
inline uint32_t THardwareInfo::getTickCountMs() noexcept {
51-
return getTickCount() * 55;
52-
}
48+
inline uint32_t THardwareInfo::getTickCount() {
49+
return *(uint32_t *) MAKELONG( biosSel, 0x6C );
50+
}
51+
inline uint32_t THardwareInfo::getTickCountMs() {
52+
return getTickCount() * 55;
53+
}
5354

54-
inline uint16_t THardwareInfo::getScreenRows(void) noexcept
55-
{
56-
return 25;
57-
}
58-
inline uint16_t THardwareInfo::getScreenCols(void) noexcept
59-
{
60-
return 80;
61-
}
55+
inline uint16_t THardwareInfo::getScreenRows(void) {
56+
return 25;
57+
}
58+
inline uint16_t THardwareInfo::getScreenCols(void) {
59+
return 80;
60+
}
6261

63-
inline void THardwareInfo::cursorOn(void) noexcept {
64-
65-
}
66-
inline void THardwareInfo::cursorOff(void) noexcept {
67-
68-
}
69-
70-
inline uint16_t* THardwareInfo::getColorAddr(void) {
71-
return (uint16_t*)colorSel;
72-
}
73-
inline uint16_t* THardwareInfo::getMonoAddr(void) {
74-
return (uint16_t*)monoSel;
75-
}
62+
inline void THardwareInfo::cursorOn(void) {
63+
64+
}
65+
inline void THardwareInfo::cursorOff(void) {
66+
67+
}
7668

69+
inline uint16_t* THardwareInfo::getColorAddr(uint16_t offset) {
70+
return (uint16_t *) MAKELONG( colorSel, offset );
71+
}
72+
inline uint16_t* THardwareInfo::getMonoAddr(uint16_t offset) {
73+
return (uint16_t *) MAKELONG( monoSel, offset );
74+
}
75+
} // namespace: tvision
7776
#endif // __HARDWARE_H__
7877

src/user32/TurboVision/src/Hardware.cc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@
1111

1212
# include "tv.h"
1313

14-
uint16_t THardwareInfo::biosSel = 0x0040;
15-
uint16_t THardwareInfo::monoSel = 0xB000;
16-
uint16_t THardwareInfo::colorSel = 0xB800;
14+
namespace tvision {
15+
uint16_t THardwareInfo::biosSel = 0x0040;
16+
uint16_t THardwareInfo::monoSel = 0xB000;
17+
uint16_t THardwareInfo::colorSel = 0xB800;
1718

18-
THardwareInfo::THardwareInfo()
19-
{
20-
21-
}
19+
THardwareInfo::THardwareInfo()
20+
{
21+
22+
}
2223

23-
THardwareInfo::~THardwareInfo()
24-
{
25-
24+
THardwareInfo::~THardwareInfo()
25+
{
26+
27+
}
2628
}

0 commit comments

Comments
 (0)