OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 1:49 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: problem with printing string ! [SOLVED]
PostPosted: Wed Nov 22, 2017 8:54 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
osdevnewbie wrote:
iansjack wrote:
If your code is interesting enough that you ask others to spend their time helping you with it

I've sincerely apologized for wasting your precious time.
when I said "not interesting" I meant for other people, cause I'm following a guide posted on the web since a long time, so there's no NEW thing I've done.
For me of course it's very very interesting.


Be that as it may, the fact is that even with regular backups, version control is still very useful, and not at all difficult.

Besides, it is a good habit to get into for any programming project. It seems to me that this is exactly to time to get into that habit, while you are working on something where the consequences of a mistake aren't so dire, and you can freely experiment with a VCS to get the feel of it, and try out different VCS programs to see which ones you are comfortable with - there are about a half dozen VCS systems to choose from, each with their own strengths and weaknesses.

Note that most of these are primarily shell-based but some (mostly the commercial ones such as Perforce or Team Foundation Server) use GUIs as the standard interface. The command-line ones have add-on GUI or Web interfaces for them, such as Tortoise for SVN or the Git Windows Client. Also, most IDEs have a version control hook or add-on which can be used with at least one of the common VCSes, and most have add-ons for several; you usually can use either SVN or Git, at least, and most support both.

In case it isn't clear, Subversion and Git are far and away the most common ones, and Git especially is very popular right now thanks the relative ease of use on GitHub. While Git is somewhat contentious - a lot of people really dislike it - it is worth knowing even if you aren't using it yourself, because so many other people are using it and a lot of open-source software is hosted through GitHub.

I don't want to sound like a broken record, but there really are a lot good reasons to use a VCS, and most people, no good reason not to.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: problem with printing string ! [SOLVED]
PostPosted: Wed Nov 22, 2017 9:56 am 
Offline
Member
Member

Joined: Sat Mar 26, 2016 1:25 pm
Posts: 36
MichaelPetch wrote:
if you want to reduce code since and get rid of the 4kb you can use this:
Code:
ld -nostdlib -T NUL --file-alignment 0 --section-alignment 32 -o kernel.tmp -Ttext 0x1000 kernel_entry.o kernel.o


Yes this works great, thanks.

MichaelPetch wrote:
The reason your code started to break when you moved the vidmem to global scope is that it was placed in the data section, and that would have added an additional 4kb to your kernel. Since you only load 15 sectors (of 512 bytes each) for the kernel that will exclude anything beyond from byte 7680 (15*512) onward. Your `vidmem` pointer likely fell outside the kernel you were loading and thus not initialized to 0xb8000 .

even with 30 or 40 sectors loaded and with the stripped version (ld -nostdlib -T NUL --file-alignment 0 --section-alignment 32) this still not working !!

MichaelPetch wrote:
I noticed an issue in your Makefile. You have this:
Code:
kernel.O: kernel.C
Case matters here I believe you want
Code:
kernel.o: kernel.c
. The way you have it would produce kernel.o from kernel.c using the default Make rules.

I changed kernel.C to kernel.c with no effect !


Top
 Profile  
 
 Post subject: Re: problem with printing string ! [SOLVED]
PostPosted: Wed Nov 22, 2017 10:07 am 
Offline
Member
Member

Joined: Thu Nov 16, 2017 3:01 pm
Posts: 47
osdevnewbie wrote:
MichaelPetch wrote:
I noticed an issue in your Makefile. You have this:
Code:
kernel.O: kernel.C
Case matters here I believe you want
Code:
kernel.o: kernel.c
. The way you have it would produce kernel.o from kernel.c using the default Make rules.

I changed kernel.C to kernel.c with no effect !


Just figured I'd clarify why MichaelPetch suggested this (presumably). Unix filesystems are case-sensitive. In the really old days of C++, before it was even called C++, it was called CFront, and the compiler determined whether or not to pass the code through the cfront transpiler based on the file extension. Lowercase C meant a regular C source code, and uppercase C meant CFront (C++) source code. This ended up being a bad idea, because some filesystems like FAT12/16 stored filenames in all caps. Alternative file extensions included ".cc", ".cpp", and ".c++" for source code and ".H", ".hh", ".hpp", and ".h++" for headers.


Top
 Profile  
 
 Post subject: Re: problem with printing string ! [SOLVED]
PostPosted: Wed Nov 22, 2017 3:01 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 693
osdevnewbie wrote:
I changed kernel.C to kernel.c with no effect !
You did see that I asked you to also change kernel.O to kernel.o? And when you say it doesn't work - in what way?


Top
 Profile  
 
 Post subject: Re: problem with printing string ! [SOLVED]
PostPosted: Thu Nov 23, 2017 6:13 am 
Offline
Member
Member

Joined: Sat Mar 26, 2016 1:25 pm
Posts: 36
Ok now I get the string printed when I declare a global pointer to video RAM.
Many thanks for all of you.
The next step will be using Interrupts, the timer or the keryboard.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group