Graphic Primitives

Programming, for all ages and all languages.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Graphic Primitives

Post by Combuster »

i586coder wrote:any comments :!:
Why is a 32 bit memset acccepting only 8-bit data? :roll:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Graphic Primitives

Post by Troy Martin »

Have you tested it? We can't really reply and comment without results, other than the fact that I think your using of assembly for a memset is completely unnecessary. You can do it all in C without any asm needed.

<This space reserved for fix, comment, congratz, witty remark, or smartassery. :D >
Combuster wrote:
i586coder wrote:any comments :!:
Why is a 32 bit memset acccepting only 8-bit data? :roll:
Maybe it's a memset for a 32-bit OS? Kinda silly, though, imho.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Graphic Primitives

Post by Combuster »

No I haven't tested things, but I can do manual instruction counting based on what code a compiler can produce.

And he's not using a common compiler... (If I had to guess, its Turbo C which doesn't optimize at all)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: Graphic Primitives

Post by DeletedAccount »

Code: Select all

/*

     
     
      Lots of comments
      even more comments
      some more comments

*/

I am just joking .... :) . Hope you dont take it too seriously :) . You are using a 16 bit compiler :) , turbo C .

Regards
Shrek
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Graphic Primitives

Post by neon »

Why are you writing a 32 bit OS in a 16 bit compiler? I assume you are using Turbo C by your usage of its ES directive. (Or has Borland released a 32 bit version of Turbo C that I am not aware of?)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
i586coder
Member
Member
Posts: 143
Joined: Sat Sep 20, 2008 6:43 am

Re: Graphic Primitives

Post by i586coder »

OK,
I'm using
1)nontraditional TURBO C++ 3.X PATCH AS FIRST STAGE COMPILING TO PRODUCE 32BIT ASSEMBLY INSTRUCTIONS
2)TURBO ASM 32BIT TO INTEGRATED WITH TURBO C,AND THIS IS THE IMPORTANT PART

so to be clear, C/C++ source file --> TCC --> ASM -->manual modification --> TASM --> OBJ
--> EXE
Combuster wrote:
i586coder wrote:any comments :!:
Why is a 32 bit memset acccepting only 8-bit data? :roll:
good question, in pixel art i need to repeat one pixel(byte) N times

CheerS,
a.T.d
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Graphic Primitives

Post by Combuster »

i586coder wrote:
Combuster wrote:
i586coder wrote:any comments :!:
Why is a 32 bit memset acccepting only 8-bit data? :roll:
good question, in pixel art i need to repeat one pixel(byte) N times
You so totally missed the point.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Graphic Primitives

Post by Troy Martin »

Combuster wrote:No I haven't tested things, but I can do manual instruction counting based on what code a compiler can produce.
Sorry Com, was aiming my post at the OP :lol:
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
Post Reply