Assembly Demo

29Jun09

At the moment, I’m at the beginning of gathering the required programming and technical knowledge to start writing my own OS. I’ve been messing around with assembly, and now I have a very-very-and I mean VERY simple screenshot to show you:

What do we see here?

  • The video mode has been switched to VGA.
  • We’ve printed the string on the screen.
  • We’ve drawn a straight line.

Not much, I know. Pretty simple code too. But note, that no DOS functions were used, all this runs from the boot sector of a 3.5 floppy.

Next step is to read sector no. 1 from the floppy into the memory…


 

For some time now, I have been having trouble with deleting folders that contain a lot and – I mean a _lot_ – of files. Such folders are very hard to remove either with Windows Explorer or Total Commander.
The reason for that is unknown to me. I guessing it has something to do with reading the file attributes – which is completely unnecessary. For a while now I have been searching for a solution and I believe to have found it.
Note: I do not claim anything, just saying that I completely forgot about this possibility.
So here it goes. Very simple. Open up the command prompt, navigate to the folder of interest (or it’s parent folder) and type the command:
rmdir “<foldername>” /S
Change <foldername> to the name of the folder you would like to delete. The S switch ensures that all files and subfolders will be deleted as well.
After hitting <Enter> you’ll be prompted to approve the delete, and the deletion occurs.
While using Total Commander, the deletion of a fairly large folder (read: ~350MB, ~20k files) would take somewhere up to an hour, with the command above it’s less than ten seconds. Sweet, eh? Cheers!

For some time now, I have been having trouble with deleting folders that contain a lot and – I mean a lot - of files. Such folders are very hard to remove either with Windows Explorer or Total Commander.

The reason for that is unknown to me. I’m guessing it has something to do with reading the file attributes – which is completely unnecessary. For a while now I have been searching for a solution and I believe to have found it.

So here it goes. Very simple. Open up the command prompt, navigate to the folder of interest (or it’s parent folder) and type the command:

rmdir "<foldername>" /S

Change <foldername> to the name of the folder you would like to delete. The S switch ensures that all files and subfolders will be deleted as well.

After hitting <Enter> you’ll be prompted to approve the delete, and the deletion occurs.

While using Total Commander, the deletion of a fairly large folder (read: ~350MB, ~20k files) would take somewhere up to an hour, with the command above it’s less than ten seconds. Sweet, eh? Cheers!


2GB

27May09

… of RAM. As of some time today, there is 2GB of RAM in my laptop. That’s twice that size than before. As I expected, boot time and the overall performance did not improve that much. On the other hand startup time for VS2010, Photoshop and the like did in fact improve a lot.

The in-depth explanation for that is when you start a program, the operating system checks whether there is enough space in the physical RAM. Note: With Vista and 1GB of RAM, there is hardly enough space for Notepad. If there isn’t, then it moves some stuff to the virtual memory which is on the HDD. Think about it… Starting a program like Photoshop, which in itself may use up well more than 500MB of RAM, after a while the opsys is writing parts of the program that is startin up to the disk. Bit of overhead, ain’t it? Reading the program from the disk just to write it back…

Finally some numbers. With 1GB of RAM, VS2008 alone would use up 9x%. Now with 2GB of RAM, having VS2010 and Photoshop running, memory consumption totals at 63%. Sweet.


The full title should be First Impressions on Visual Studio 2010 Team Suite Beta 1 – Part I. For obvious reasons (khm, it wouldn’t fit) I truncated it. Part I refers to the fact that this really is a first impressions review. I installed it, and now I share what I’ve noticed when I first ran the software. There won’t be no juicy in-depth details, pixel-by-pixel comparisons. Just the surface.

Well then. Let’s begin.

We begin – naturally – by clicking on the Visual Studio 2010 icon in the Start Menu. It’s easy to find because it’s the same as the old ones, except it now has a 10 instead of a 9 in the lower right corner.

When VS starts, we’re immediately hit by the new design. As it was stated by Microsoft, they redesigned the look and feel for WPF (more on that later). It is impressive. Looks good, feels good. The default dark blue background is a good choice, it emphasizes that the code is the important stuff here, not the menus or toolbars. Here, have a look:

As you can see, there is no Start Page. Well, that’s my bad, because in fact this is the second time I’ve started the program. As you could have guessed, I’ve closed the Start Page the first time, and it didn’t open automatically this time around. It’s a small but very important change that shows they realized that it’s better to observe what the user does instead of asking him (or her) stupid questions. Thumbs up there.

Although the new Start Page (yes, it’s been updated) is worth looking at. It now has three pages (I don’t know what the official term is), namely Welcome, Projects and Visual Studio.

The first page – Welcome – doesn’t mean much to me. In fact it means so little that I forgot what’s on it by the time I’ve got around to writing this. Sorry, but I don’t think it’s important.

Projects is what you see on the picture. It has icons for Recent Projects, New Project and Open Project. The meaning and functionality of these is pretty straightforward, I won’t waste any more bits on that.

The third page is Visual Studio, with links to Help, MSDN Library and that sort of stuff. Links really.

I doubt that I’ll ever use anything but the Projects page here. Nonetheless, the improvements are welcome.

Since we create new projects often, let’s create a new project. Another stunning discovery, they’ve changed the New Project dialog completely. OK, maybe not so completely, but it looks way different than before. Right?

We’re given a nice and thorough list of project types, organized into well defined categories. Creating the „Recent Templates” seems to be a good idea. Although I’m not so sure I’ll want to waste an extra click just to select the required project type from „Recent Templates” when it’s usually an already available option on the first list.

„Online Templates” is another good idea, which I couldn’t get to work however. I’ll keep in mind that this is still Beta 1, so hopefully it’ll work in future releases.

Apart from those, we still have the option to select which .NET version we are targeting, we can search for a project type if we can’t find it and we’re given a description about the selected project type. This last one is the evolution of the small description bar that used to reside at the bottom of the list. Somehow I never understood how they were supposed to fit the difference between e.g. a „Web Site” and a „Web Application” on that very little space. Well, it’s solved now. Lot’s of room for some marketing b/s.

Anyway, from the New Project dialog, I’ve proceeded to create a new Console Application project. That’s because I’m more interested in writing code than designing user interfaces. (I do the latter in Photoshop, then type it in.)

Yeah baby, new IntelliSense. Finally! The dudes working on the C# editor have finally decided to take the next step in IntelliSense evolution. I must say it’s been done well. The first impression is a lighter window without the ugly and fat window border. The second is not an impression but a surprise. The new IntelliSense window filters the possibilities based on what you type, therefore showing only those items that in some way match what you’re typing. This is a long awaited and very welcome improvement.

As is the highlighting of related items in the code, as seen on the picture. Don’t really know how to describe what’s happening here. When I position the cursor (not the mouse cursor) in a variable name or a method name, it highlights every other occurrence of that. In this case the cursor is located somewhere in the PrintSomething function call in the main body. The effect is unmistakable.

Another small change to the code editor is the way how selections look. When selecting a part of the code, we’re presented with the familiar gradient and border we’ve already met in Extension Blend. Eye candy, related to the switch to WPF.

upd (2009.05.27.): I do have to add this here. I have just discovered another addition to the VS2010 code editor. Namely that it scrolls downward until the last line is at the top of the page. That allows us to position the portion of the code we are working on anywhere on the screen whereever we see fit.

Since I’ve planned this review to be as short as possible, I’m stopping here. I don’t want to go into more new features, I’ll say some bad stuff instead.

Yeah, up to this point I’ve really seemed enthusiastic about this new release. Well there is a downside, and it’s big. It’s performance.

The performance of VSTS2010 is horrible. The switch to managed code and WPF was the worst that could happen to VS in terms of performance. The eye candy is nice and all, but come on guys! Ten seconds for hitting an Enter??? Enough time to make a coffee and have a cigarette when building a simple Hello World app??? That just won’t do.

Or what about the Toolbox? Do you actually load all the controls when opening the toolbar? Way too slow and I’d have expected you to sort that out ‘cause that little problem has been with us since VS2003.

In any case, I’ll continue discovering the wonders of VSTS2010 another time. Stay tuned for some UML modeling and ASP.NET development in VSTS2010…


It’s getting near. With 42 credits worth of courses in my bag I might say that I’m a tiny little bit crazy. It’s been hell, and it’s still not over. By now I’ve already completed 12 credits, and acquired enough points to take the exams for another 21. It won’t be easy, but I’d say that it’s not impossible. Not much more to say about it really.


Embedded stuff

09May09

I’m talking about blog content here.

As the ‘net grows ever larger and more and more people can not only view, but also create content, conscious usage of web-based technologies is fading into oblivion. People embed everything – and I mean everything - into their blog posts nowadays. That’s a problem.

It’s a problem of enforcing our will on others. Yes, it’s your site, yes, you’re the one who decides what goes on the page. But I doubt that anyone will risk another trip to your site if he or she find nothing else but two-to-the-power-of-infinity YouTube videos embedded. Why? Because it makes your site slow, it even makes the visitors’ machine slow. And we don’t want that, do we?

Yes, you who are reading this post guessed it right. I’m VERY annoyed by embedded YouTube videos. Half of the blogs that I read have those which irritates me a lot. Give me an image and a link, and I’ll decide whether I want to see it. Quick tip: I usually don’t want to see it.

Thank you for reading this completely useless piece of information. I’m sorry, my head hurts so much that I had to share this with someone.


Yep, that’s the big question. I’ve finally decided that I’m going to have a go at operating system programming again. I’ve been reading about kernels, osdev concepts, protected mode, and similar stuff lately. I’ve found that by taking small and carefully designed steps from time to time, I can actually make something happen.

Hence the question in the title: Where to begin?

It’s pretty much obvious that the easiest way to test anything I’ll write is by some means of virtualization. I’m eyeing Virtual PC at first because I’ve some experience with it already. My goal is to create a virtual disc image with GRUB preloaded on it, and run that in VPC. Which kind of image (HDD or CD-ROM) I don’t know yet. I think the best would be to have a HDD image, but no tutorials in that direction yet, so… yeah.

After the testing environment (what I’ve just described) is set up, I’ll start coding. First is a simple “Hello world!” kernel, to prove the point. After that I’ll be aiming for pretty much everything a good kernel should offer. Protected mode, multitasking, memory management, and a whole bunch of other words and phrases that I haven’t even heard of.

The problem is Windows. I am running Windows, Vista to be specific. It’s not exactly the dream environment for operating system development. Mostly because every tutorial there is, is *NIX based. Since I don’t want to switch to any of those systems, I don’t know yet how I’m going to proceed. I’m going to give Cygwin a shot, see where that can get me.

More on this later.


Some time ago I wrote a post about the problems that have arisen with my old desktop PC. I doubt that you’d remember, but the two problems is question were the wrong RAM modules and the strange lines running through the screen.

These problems render the rig completely useless, and I have just figured out, that if I wish to use it as I prefer (that is with a Full HD 1920×1080 resolution), big changes will have to be made to the configuration.

I discussed the original matter with my godfather, who’s pretty much a pro in terms of computing, and he told me, that the image visible on the screen is also stored in the memory, and that the lines might be due to the slow speed of memory access.

Well I just calculated the required speed, and guess what? He was right. The display image (assuming 32 bits per pixel) needs around 8MB of RAM. To read that out of the memory 60 times per second (because of the 60Hz refresh rate), a RAM access speed of approximately 475MHz is required, whereas my config is only capable of 333MHz.

So the conclusion is that I’ll have to upgrade my computer significantly. Hopefully to some sort of multi-core processor and at least a few gigabytes of DDR2 RAM. Unfortunately those kinds of boards come with SATA and PCI-E ports, therefore the harddrive and the graphics card will need to be changed too. And that’s a lot of money…


Three of the most known member of the hungarian blog scene, angelday, doransky and hirbehozo has decided to compete on the number of Twitter followers, much like Aston Kutcher and CNN did so not that long ago. Unlike the latter, who’s goal was to reach one million followers in an unspecified amount of time, the three hungarian bloggers gave themselves one month to reach 2009 followers.

Even if I could, I wouldn’t decide which of them to support. But then again, I’ve been following all three of them long before all this has started.

If you wish to support them, read their blogs (links on the top of this post), then decide on who you’re going to support, register on Twitter and follow the appropriate person (or all three of them if you want to).

Good luck to Them!


New look

23Apr09

I have changed the look of the site to another theme provided by wordpress.com. The simple reason is that I don’t write enough for the previous theme, which works best when there is at least one post every day, and lots of comments. Since this page lacks both, the new theme came forth. My impression is that it’ll work well for me.

On the other hand, yes, I’m a bit ashamed that I haven’t written anything for weeks. For one, I can’t find a good topic to write about. Secondly, I don’t have the time to write at the moment. I’m stuck up to my neck in work, and I mean work. I am building a website, specifically a website engine. It’s the hardest I’ve ever done, but it’s a great experience. Plus there’s a lot going on at school, and I could list the reasons for a hundred more pages. Stay tuned – or don’t – but there will be at least one meaningful post in the near future.