Coder Social home page Coder Social logo

scopeinfinity / fuzzyos Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 5.0 828 KB

32-bit x86 multiprocessing OS capable of running console or graphical user applications.

License: Apache License 2.0

Assembly 10.97% Shell 3.83% C 54.31% Makefile 6.01% GDB 0.50% Python 1.09% C++ 23.29%
assembly-x86 boot-image bootloader c console custom-os drivers fuzzy graphics hacktoberfest hobby-os kernel multiprocessing os qemu x86

fuzzyos's People

Contributors

dreampearl avatar scopeinfinity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fuzzyos's Issues

va_arg for arguments other than 4 bytes

As for now va_arg increases the internal pointer by 4 bytes on each occurrence, which is not ideal if the argument passed size is different (ex. long long, double, long double or custom data structure using struct).

A bit of additional context (if interested):

  • Within FuzzyOS we are pushing arguments on the internal stack instead of relying on register arguments (default behavior).
    • We are overriding the default behavior using the -m32 flag of gcc.

This isn't a problem while passing char, short as they are auto promoted to int-size.

Improve escape sequences support in *printf(...)

Source

Specification

Source: https://en.wikipedia.org/wiki/Printf_format_string#Format_placeholder_specification

  • syntax for a format placeholder: %[parameter][flags][width][.precision][length]type

To keep things simple we can go with the subset of the following options to build an minimum viable product

  • Type field:
    • '%'
    • 'd' 'i'
    • 'u'
    • 'f' 'F'
    • 'g' 'G'
    • 'x' 'X'
    • 'o'
    • 's'
    • 'c'
    • 'p'
  • Length field:
  • Flags field:
    • The field may be omitted (default, current behaviour)
    • '-' minus
    • '+' plus
    • ' ' space
    • '0'
  • Width field:
    • The field may be omitted (default, current behaviour)
    • or a numeric integer value
    • or a dynamic value when passed as another argument when indicated by an asterisk *.
  • Precision field:
    • The field may be omitted (default, current behaviour)
    • or a numeric integer value
    • or a dynamic value when passed as another argument when indicated by an asterisk *.

Multiple small pull requests are way better than one giant one :)

Add unit-test for implementation of <stdlib.h>

Example PR for the unit-test for the implementation of <string.h>: #36

  • int min(int a, int b);
  • int max(int a, int b);
  • int abs(int a);
  • int atoi(const char *s)
  • void itoa(int num, char *s, int base);
  • void ftoa(double num, char *s);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.