Modified some things in CONTRIBUTING and in the Makefile.
Started coding some things for the FAT12 filesystem.
This commit is contained in:
Vincenzo Aleksey Brocato 2024-12-30 18:48:37 +01:00
parent 3005c48cdb
commit df5dcdc34d
5 changed files with 131 additions and 13 deletions

View File

@ -9,8 +9,8 @@ This project isn't nothing serius, just a hobby project.
## Violate the license
XanvicOS has a license, the GPLv3 license. If has been chosen by the author of something, it has been chosen for a reason. If you violate it you don't respect the idea of the creator about his code.
So, in respec of the author, don't violate it.
XanvicOS has a license, the GPLv3 license. If has been chosen by the author, it has been chosen for a reason. If you violate it you don't respect the idea of the creator about his code.
So, to respect of the author, don't violate it.
## Violate the Code of Conduct
@ -18,11 +18,15 @@ Pretty much for the same reason as the license: it exist, it has been chosen, pl
## Hurt and/or harass someone
If you don't understand why, we DON'T need more people like you. As I already wrote in "What we want", we need to respect each other, so let's do it, no?
As I already wrote in "What we want", we need to respect each other, so let's do it, no?
## Do something stupid
"Doing something stupid" means a lot, by don't knowing what you are doing, to commit crimes. But it doesn't mean you can't make some errors here and there, we are humans after all.
"Doing something stupid" means a lot, from not knowing what you are doing, to commiting crimes.
## Troll (too much)
You can make some trolls, but you can't do something like creating 100 pull request about deleting all the code.
# Here is what you need to do
@ -30,10 +34,6 @@ If you don't understand why, we DON'T need more people like you. As I already wr
As I already said, this project is built off the idea of respecting each other while contributing. Without respect nothing can be done.
## Don't troll (too much)
You can make some trolls, but you can't make like 100 pull request about deleting all the code and call it "modernize the code"
## Think before doing
Self-explenatory, before doing something, think about what can be done better. If you can't think of anything better, then do it
Self-explenatory, before doing something, think about what can be done better. If you can't think of anything better, do it

View File

@ -6,7 +6,7 @@ LD16=/usr/bin/watcom/binl/wlink
SRC_DIR=src
BUILD_DIR=build
.PHONY: all immagine_floppy kernel bootloader clean always
.PHONY: all immagine_floppy kernel bootloader always clean
#Immagine floppy
@ -54,6 +54,6 @@ always:
#Clean
clean:
rm -rf $(BUILD_DIR)/*
rm $(BUILD_DIR)/* -rf
#Strumenti

View File

@ -0,0 +1,14 @@
#pragma once
#include "stdint.h"
#include <cstdint>
#include <stdio.h>
typedef struct {
uint8_t id;
uint16_t cilindri;
uint16_t settori;
uint16_t testine;
} DISCO;
bool InizializzaDisco(DISCO* disco, uint8_t numeroDisco);
bool leggiSettoriDisco(DISCO* disco, uint32_t lba, uint8_t settori, uint8_t far* dataOut);

View File

@ -46,3 +46,105 @@ _x86_div64_32:
pop bp
ret
global _x86_ResettaDisco
_x86_ResettaDisco:
push bp
mov bp, sp
mov ah, 0
mov dl, [bp + 4]
stc
int 13h
mov ax, 1
sbb ax, 0
mov sp, bp
pop bp
ret
global _x86_LeggiDisco
_x86_LeggiDisco:
push bp
mov bp, sp
mov dl, [bp + 4]
mov ch, [bp + 6]
mov cl, [bp + 7]
shl cl, 6
mov dh, [bp + 8]
mov al, [bp + 10]
and al, 3Fh
or cl, al
mov al, [bp + 12]
mov bx, [bp + 16]
mov es, bx
mov bx, [bp + 14]
mov ah, 02h
stc
int 13h
mov ax, 1
sbb ax, 0
pop es
pop bx
mov sp, bp
pop bp
ret
global _x86_OttieniParametriDisco
_x86_OttieniParametriDisco:
push bp
mov bp, sp
push es
push bx
push si
push di
mov dl, [bp + 4]
mov ah, 08h
mov di, 0
mov es, di
stc
int 13h
mov ax, 1
sbb ax, 0
mov si, [bp + 6]
mov [si], bl
mov bl, ch
mov bh, cl
shr bh, 6
mov si, [bp + 8]
mov [si], bx
xor ch, ch
and cl, 3Fh
mov si, [bp + 10]
mov [si], cx
mov cl, dh
mov si, [bp + 12]
mov [si], cx
pop es
pop bx
pop si
pop di
mov sp, bp
pop bp
ret

View File

@ -2,5 +2,7 @@
#include "stdint.h"
void _cdecl x86_div64_32(uint64_t dividend, uint32_t divisor, uint64_t* quotientOut, uint32_t* remainderOut);
void _cdecl x86_Video_WriteCharTeletype(char c, uint8_t page);
void _cdecl x86_ResettaDisco(uint8_t drive);
void _cdecl x86_LeggiDisco(uint8_t drive, uint16_t cilindro, uint16_t testina, uint16_t settore, uint8_t numeroSettore, uint8_t far * dataOut);
void _cdecl X86_OttieniParametriDisco(uint8_t drive, uint16_t tipoDriveOut, uint16_t cilindriOut, uint16_t settoriOut, uint16_t testineOut);