Jump to content
xisto Community

osknockout

Members
  • Content Count

    401
  • Joined

  • Last visited

Everything posted by osknockout

  1. Haha, C's not too old. I still use it for a bunch of stuff, although I'm starting to shift towards x86 assembly for a bunch of stuff. In fact, I'd say C's more system efficient than C++. I don't know about .NET since I haven't used it ever.
  2. That's quite odd. The FPU stack's 80 bits right? Alright, so rounding standards are easier to edit than I believed... thought I'd need to make my own process. I don't get why it pushes 1 to the FPU stack though. By the way, if you search google for 'x86 clocking' this thread is #1. Um... thanks canute24, that was a nice reminder of what I learned back in my printf("Hello World!\n"); days. However, I'm trying to create the finest operating system that I can, so every cycle matters. Hey, I'm trying to optimize reading and writing to the hard disk. should I first get the processor type & speed, and hard disk RPM from BIOS (last one I'm not sure about) and wait for the computed avg. access time and then check the hard disk status, or should I just let the PIC handle this one?
  3. Wow, I miss the C++ forums for some weeks, and see the changes! Alright, let's see.By ops you mean operations as in statement; not uops right? (assembly stuff) 'Cause otherwise it's crazy. I'm assuming you're talking about 2's complement negatives from your code . It seems your problem is that your code does NOT account for negative numbers. Example:int x = 4; int y = -5return ((x + (~y + 1)) >> 31 ) ;/*Dev-C++ defines int in the range of -32768 to +32767, therefore : */-> return ((4 + (~5 + 1)) >> 31;-> return (4 + -5) >> 31;-> return -1 >> 31;-> return 1;so 4 is less than -5 that's ok, I do the same thing at times. I'll get the answer to you when I think of it.
  4. Really? Because that would just produce the same results as any other tan function since the period is pi. Were the FPU developers THAT lazy to add a few cycles to subtract pi from the darn thing if it's greater than pi? Hmm... FRNDINT... seems that there's no ceil float->int instruction.
  5. Thanks, those links very really helpful. I'll be awaiting your VGA tutorials then...
  6. Oh I get it... hello world calculator. Could you guys give me some tutorial links for VGA graphics? I haven't really delved into graphics programming, but I learned a bunch about pixel clocking some time ago.
  7. A hello world calculator? Well you're starting pretty high off if you're going for a screen saver. My first did nothing, and the second one right after that printed Hello World! on DOS. In fact, I haven't made a screensave or calculator yet, still getting down the intermediate topics. Besides, that'd be kind of hard, learning all those VGA routines and some real pixel clocking. They are pretty good tutorials, better than the first ones I've read. Well let's not get too philosophical here but you raise a good point. Optimization almost comes second hand to me, but then again, I'm still struggling on the different types of memory segmentation.
  8. ;'s. you forgot to define the different types of segmentation schemes, but still, you did a very fine job introducing everything, better than many I've seen. :applause:
  9. I know, but still it's best to learn optimization soon after you get the basics of assembly. Besides, getting it at the basics leads to less bloated code later on, something every program needs.
  10. Thanks, I haven't bothered to use FPU yet, but I'll be using it soon enough. By the way, do you have any idea what a PARTIAL tangent is? I don't.
  11. Alright, so they just renamed it the FPU. What's interesting is that FPU operations take longer than processor equivalents for older processors, but the reverse is true for newer processors. Is there an assembly instruction which converts float to ints? or should I just do it the old guru way? Thanks for the links.
  12. Oh, I'll look at it in my free time... Glad I'm not the only one still going hello world. Perhaps, but to make the best OS you need the best stuff... and for me that's optimized assembler.
  13. Jeez, I tried to reply to this twice and my power failed both times. Thanks for taking the time to research and you're welcome for the rep. point, you deserved it. So, besides FPU operations , can you directly control the *87 coprocessor? or is it just the FPU? I heard on comp.lang.x86.asm (might be jumbled up, typing off memory) that it was called by several different names and seemed like it could do more than just floating point operations. By the way, are the clock cycles for the *87 the same as what the sites you've suggested report? I'm just full of questions , and my PERL learning is taking time off of assembly research.
  14. Actually I picked up TASM for programming TI-83's and then quit in 2 weeks... not worth it. I'm barely an intermediate at assembly (1 year experience) and I just made a "Hello World!" floppy-os. Yes, go on laughing. I haven't even ventured into protected mode, but then again, I have little free time. Yep, but I seriously thought that the Win programmers did program their OS in C, like Linux. By the way m_rahman, you should read a few optimization articles after you get the gist of assembly: how to get the most operations in the smallest number of clock cycles, how to make a program smaller & more efficient, etc. I suggest you look at my x86 clocking topic.
  15. actually you'd be surprised. I first started with C back in 8th grade and started to learn assembly freshman year of high school. Also, function parameter is not what you're used to. Instead of doing say func(a,b,c), you do a -> register 1, b -> register 2, c -> register 3, call func(). Might seem like it takes more time, but it's probably less than the high level equivalent in real code. If you ever want to write an OS (like me) I suggest you pick up FASM now as well as NASM. I haven't heard of too many respectable programs in TASM except for the ti calculators
  16. I mean source code as in what you wrote... MingW eh? I only use plain old gcc, so I can't help you with that one. Well yes and no, see, it's not defined in the standard as to whether or not you can do so. Why don't you compile it and give it a try? We're all stumped.
  17. Wow... that's going to take me some time to digest... thanks. Alright, I'm interested. How does it actually do that?
  18. I also recommend FASM http://flatassembler.net/ fasm demands less cryptic assembler syntax and you can virtually just compile code you see on the Art of Assembly tutorials online into it.
  19. Is EA applicable for the other processors as well? (Seems like it, but it would not explain why an 286 takes more time than a 808x) hmm... I think the new Pentiums might change the number of clock cycles interchangably because of a new architecture setup everytime.
  20. In that case, I'll need to read those tuts Can't help you with the refresh rates though. Now when you say segment override, do you mean a 64 K boundary? Sorry if I sound like I'm high, but what do you mean by it? It doesn't make sense that it would take a different number of clock cycles for different registers, but I'll take that info as valid as I'm not too familiar with BP, not ever having to really study it yet.
  21. That's one odd incident lordofthecynics. Ok, so 0a000h is acceptable at least to TASM. I'd like to see your new compiler and your tutorials, vizskywalker. Are they going to be newbie, intermediate, or advanced? By the way, what's the base number of clock cycles needed for a LEA assuming reg,mem?
  22. I think it's only defined in a hash format (day="monday")but can be made for an index format. Last time I wasat odds with the issue, it changed from standard to standardeven across compilers. Even we sages do not know now ... so tell us what you find.
  23. Ok, let's think about this. This is the C/C++ programming forum. What 8bit just said makes perfect sense in C++ (exception handling), so it's probably not Java Just a thought leeiah. Could you please state what compiler you're using (version also) and perhaps the source code? Normally that would not even compile with what I'm using.
  24. All right, that makes sense. I have read AoA by the way, so I'm familiar with your load information - I just didn't realize they did the same thing. By the way... isn't it mov ax, a000h instead of mov ax, 0a000h? Technicalities
  25. I know, I know. I was asking how THEY measured it. Thanks for the links by the way.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.