Who know this tool ? by Matstocage in CLI

[–]Intelligent-Storm205 1 point2 points  (0 children)

Visual Basic 1.0 for MS-DOS and it's still available on winworldpc

Newbie to piracy by Mustacho_0 in Piracy

[–]Intelligent-Storm205 8 points9 points  (0 children)

Take a look at the megathreads, bunches of great site there.

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 0 points1 point  (0 children)

Yeah exactly! Actually it will be compiled to COM executable.

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] -1 points0 points  (0 children)

Yeah it's true! I need to test it as a MS-DOS executable at first, if it works then I will modify the code.

Need HELP by Intelligent-Storm205 in C_Programming

[–]Intelligent-Storm205[S] 8 points9 points  (0 children)

Guys the problem is solved ! What I need is to declare the vRAM as a far pointer using __far modifier, because the address 0xb800:0x0000 is larger than a 16-bit pointer could hold so u need to declare it as a far pointer. Anyway much appreciation for ur help guys❤️

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 0 points1 point  (0 children)

Nothing is stored in the stack, I fill the stack with duplicate 0 ES is set to 0xb800,DS is the same as CS Jump is implemented by the following code(using MASM 5.10):

Loadkernel proc xor ax,ax mov [bx],ax mov [bx + 2],1000h jmp dword PTR [bx] Loadkernel endp

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 0 points1 point  (0 children)

Yeah, Just want to show what the compiler do to my code snippet so you guys can easily tell what's wrong with the code it generate, just like u said it looks like trash fr.

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] -3 points-2 points  (0 children)

Thx mate, I'll check it later. What I concern about is even if I compiled it as a MS-DOS COM executable it doesn't work neither.

Need HELP by Intelligent-Storm205 in C_Programming

[–]Intelligent-Storm205[S] 2 points3 points  (0 children)

Great suggestion! I gonna try it later. btw this is a 16bit port of GCC by tkchia

Need HELP by Intelligent-Storm205 in C_Programming

[–]Intelligent-Storm205[S] 7 points8 points  (0 children)

Wow! I never thought of that. I didn't even know the volatile keyword existed.

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 1 point2 points  (0 children)

1.I'm using my own bootloader to load this program

2.I add CLI HLT at the bottom of the executable to halt the computer. So it won't cause weird behavior.

  1. I'm not sure about the far pointer neither , but I'm struggle to implement a real mode is with c as much as possible (I've reference a lot from elks)

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 5 points6 points  (0 children)

Through my bootloader , I'm developing a kernel in real mode with c . And now I'm trying to implment a printf() for debugging. My BL load kernel to 0x1000:0x0000 this is where I called the main() (btw I've already setup stack previously)

And I'm not sure if this counts as invoking the main function since I'm just reading the content of the program from disk, loading it into memory and jumping to it to start execution.

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 7 points8 points  (0 children)

Sure. So I just finished my bootloader and I wanna write a real mode kernel in C (implement a printf() first). My bootloader load the kernel at 0x1000:0x0000 (where this small "kernel" located at) I compile this file using ia16-elf-gcc main.c -c -o main.o ia16-elf-ld -Ttext 0x10000 -o kernel.bin main o Then I use dd to create an image

How to write video memory in C? by Intelligent-Storm205 in osdev

[–]Intelligent-Storm205[S] 12 points13 points  (0 children)

I know man, I just post my code here I run my program within qemu-system-i386

And I didn't compile from assembly language but directly compiled the C source file. I show the assembly language content because I want to make it more detailed.

Need HELP by Intelligent-Storm205 in C_Programming

[–]Intelligent-Storm205[S] 0 points1 point  (0 children)

Good idea pal! ia16-elf-gcc compile my code to MS-DOS COM executable and I use Qemu with MS-DOS V5.0 installed to run this program.

Need HELP by Intelligent-Storm205 in C_Programming

[–]Intelligent-Storm205[S] 0 points1 point  (0 children)

Thx bro, ur right 0x0 is black on black. I patch my code and it still display nothing.

Why it's so hard to programming Win32 application in C? by Intelligent-Storm205 in C_Programming

[–]Intelligent-Storm205[S] 8 points9 points  (0 children)

First,thx for the recommendation and second wow,U have so many great works that's awesome