{"C", "GOD"}
Content Creator
@MocaCDeveloper
Rapid learner. Constantly learning something new! If C had a God, it would obviously be me!
https://github.com/ARACADERISE
0
MLMocaLang
Moca Assembler
Yo, and wassup!
I have been quite busy the past few months. I am making my own computer from complete scratch(using the 8086 intel microprocessor, breadboards etc). Along the journey, I learned I had to write my own assembly for it. Furthermore, I figured out not only did I have to make my own assembler, but I had to make it compatible with being able to load memory for the OS I am going to deploy.
My idea is to write a very efficient assembler. Maybe add some of my own syntax even? This is just a little bit of the code(I am not posting all code, for reasons).
I do have a full OS running via Qemu currently, so now it's just down to getting the computer running, getting an assembler going and deploying the OS.6
1
0
0
Official-MocaOSMy Official OS
Moca OS
This is the up-to-date source code of the OS I am creating for the computer I am creating from scratch.
No, I do not know if I will be capable of loading this OS onto actual hardware(in my case probably just have a 6502 chip read data in from the OS output).
The OS runs in VESA mode. So there is a custom font I've made to manipulate the pixels on the screen since VESA video mode doesn't support a built-in font, and VESA video mode is rather more complex due to the fact it allows you to manipulate each pixel individually, which gives us the advantage to make our own font in binary and assign signed bits to a pixel and unsigned bits get ignored(you can see this code in mstdio.h inside the putc function.
Anywho, repl kinda flops when you attempt to run/link the kernel, so if you want go ahead and just copy the source code into your terminal, make sure you have make installed, and just enter make run.
Note: I do not have the terminal part of the OS up and running due to the fact I am attempting to implement my own heap allocator, and I need to also set up the IDT before I can allow user interaction with the heap(the IDT will handle seg faults).39
1
0
Alright. I have a question.
This might stump you for a little bit, but here it is:
What if, instead of the universe growing more outwards, it grows
IMayBeMe In your second theory you state:
> What if the big bang was the result of a previous universe collapsing into a black hole, and the result of the big bang was just the leftover particles/gas from the previous universe?
This very much makes sense, but in theory, would be somewhat impossible. To start with, if a universe was to collapse into a black hole, that same black hole would get larger. Now assuming that some particles escaped and created another big bang, wouldn't the new universe also be1 year ago
ch1ck3n Yeah if your theory is correct then there must have been multiple big bangs
Also then there has to be a first big bang in the history of everything that came from nothing, and what did it come from? Honestly, the theory of creationism is much more convincing and possible than a big explosion coming from literally nothing
It is possible that the universe is shrinking and when it shrinks to a super dense black hole and that black hole will go kablooey and then a new universe will begin, and then1 year ago
Welcome back! This tutorial is going to be a bit different, and I will explain why!
Something New!
I have done some thinking, and over the past few d
CSharpIsGud Perhaps you should be looking to add more C into this, the GDT can be initialized with almost plain C, with assembly only needed to execute the instructions to load it.
What is going to be the end goal in terms of programs it can run and features?2 years ago
Hi!
In this tutorial, we will be going over development of 16-bit OSDev on Repl as well as on Linux.
Setup
Now, in the last tutorial I had mentione
dwenCeri I thought still and cli sounded familiar! I was like "why does this feel kind of strange??" Was that in the Windows tutorial? I may have missed it or something cause I remember being kind of confused.
geometry dash2 years ago
17lwinn This is helping me write an OS more easily, keep on posting! (can you please ping me when another post is out?)2 years ago
Highwayman I thought still and cli sounded familiar! I was like "why does this feel kind of strange??" Was that in the Windows tutorial? I may have missed it or something cause I remember being kind of confused.2 years ago
Hi!
Boy, am I excited about this tutorial!
I am going to be sharing my experience over my journey into OSDev. This isn't my first, nor second attempt
AlbertoHarvey I've been planning to write an operating system for the 80286 chip and its quirky 16 bit protected mode for a while now. The goal is to have a UNIX-like system without respect to compatibility and without ever escaping to real mode. Explicit goals are:
must support preemptive multi-tasking
must support shared memory, memory mapped IO, and dynamic memory allocation in all processes with an unlimited amount of segments per process
should make use of the ring architecture to achieve privilege se1 year ago
Hi!
It has been awhile since I've posted a tutorial. Don't worry! I am not ditching the series I have started.
I've just been busy doing a bit more.
firefish @MocaCDeveloper what is this
#![allow(nonsnakecase)]
why don't you use snake case2 years ago
Ignore the repl.( or get a hint of what's coming ;) )
I just wanna brag about my career taking off in the world of freelancing. I have 3 projects goi
DynamicSquid Is that an OS?
Also how do you debug C/C++ applications in VSCode? I use VS for C/C++, the only reason being it has an awesome debugger2 years ago
I did this just for fun lol. I put my knowledge of Rust to the test and this was the output of it.
I created a small little languages capable of havi
JacobMcPherson1 I was making my own small language, but mine is made in python so yours is obviously better2 years ago
Welcome! I decided I'd do two series at the same time. In this series we're going to learn about the PNG file format, and how to decode and write imag
Hi!
In this tutorial we will be going over the JPEG file format.
I am planning on making this into a series:
Understanding the JPEG file format heade
SixBeeps I remember hearing somewhere that JPEG (de)compression involves performing a Fourier transform, so I'll be interested to see where this goes :)2 years ago
ANDREWVOSS Cool! (I've always been too scared to work with the jpeg format; I heard somewhere that it's even harder than png)2 years ago
Hi!
This is a mini-tutorial I am doing during my free time!
Lets get into it!
A few things to keep in mind(for any level of programming you may be
KashLinda It is a pleasure to read a good quality article with useful information on issues of great interest. I agree with your conclusion. I look forward to your future updates. venge io1 year ago
Gleichnerr A really good post, very thankful and hopeful that you will write many more posts like this one.
https://www.rapidfs.me/1 year ago
ToRemove
ToRemove is a Go project that removes any file greater than 1mb.
This is super helpful. I am going to start using this with many of my go p
Go
Hi!
I am curious! I currently have multiple different projects I am doing(some I still have to continue that I started from a while ago).
But, while
ANDREWVOSS Yeah, a Rust-like language written in C would be cool. I'm actually learning to write a C-like language in Rust at the moment lol2 years ago
Hi!
Question
So, I did a series over BMP image rendering. I was wondering, however, if I should continue the series of rendering a BMP image and take
Hi. I am here to answer the top questions asked by new developers that also have been very indecisively answers.
Some people say to start with Python
TheDrone7 I kind of agree and disagree with this. I agree on the part that starting off with something like python which has everything built into it can be bad but I also don't think starting off with C is a good idea either because of the boilerplate and the syntax.
I feel like what I started with, is the perfect language to start coding with - BASIC. It has a fairly easy syntax so anyone can get started coding and it only has very little stuff built into it which also promotes being able to solve prob2 years ago
Hi all!
Quick question
I am going to attach a image below.
Take a guess at what this new project is. If you get the guess right, I will select your
CodeLongAndPros You're dealing with magic values + structs, so it's lowlevel. You have Rust and C, so it must be very low level. You've already done osdev, so I'd say you're reverse-engineering something.2 years ago
Coder100 Getting os vibes here
And it makes sense because the ui is best made in rust
But idk2 years ago
Simple question, yet seems to be very debatable from person to person.
Question
Is TypeScript worth learning. It seems to have a very clean syntax an
xxpertHacker Btw, TS is merely used for the same things that JS is used for. TS is a transpliled language, it's "compiler" is a source-to-source compiler which just emits JS.2 years ago
xxpertHacker TLDR: Imho, TS doesn't carry it's own weight, especially not for small projects.
I can't tell you if you will like it, but based oh how much you agree with or disagree with my logic, it may sway your opinion.
I came from C++ -> JS -> TS, here's my experience and thinking.
Typing disciplines
C++ is statically typed and weakly typed; weak typing can cause bugs every once in a while, but static typing allows one to define strict APIs, and removes the would-be runtime checking code.
JS is dynam2 years ago
Coder100 it is very worth it.
You will be writing much better js code, it prevents you from doing things like this:
let a = null;
function get_key(obj, k) { return obj[k]; }
get_key(a, 'a'); // oh nooo
not only that, but you have access to namespaces, enums, and interfaces! All very common static language features that actually are useful.
Not only that, but you can use es6 modules without having to add type="module" -- everything is all precompiled!
Also autocomplete
Also docs
Also most editors su2 years ago
Welcome back to part 2 of Learning how to render a BMP image, in C!
@DynamicSquid, @Highwayman
In this tutorial we will be going over the fundamenta
DynamicSquid This is awesome! It's almost night time for me, so I'll take a better look at it tomorrow :D2 years ago
Hi all!
It's C GOD coming back at you with another tutorial!
(I don't know why I am acting like I am having a intro to a video or something, lol)
An
ArshadSaqib It is beyond question that investing in yourself through reading (and it does not matter what book you read) is a wise investment and a venture that will pay off in the future. https://www.beleefstaverden.nl/2084-2/11 months ago
DynamicSquid I tried your example on "Creating a 1x1 image", and I saw a small red dot, but then I tried your "How to set a custom file size", and it says it couldn't support the image.
Here's my code:
#include
#include // might not be used in the tutorial
int main()
{
FILE* file = fopen("img.bmp", "wb");
char BMPINFOHEADER[ 2 ] = { 'B', 'M' };
int height = 1;
int width = 2;
int BMP_HEADER[ ] = {
0, 0, // File size, reserved
0x36, 0x28, // Pixel offset, header size
2 years ago
Highwayman I got really confused at the part where you start talking about the header. You say that we can't know the file size at the start, but then you say there is a space to enter the file size in the header...? What did I miss?2 years ago