Do you want simple pascal compiler designed for boot loaders
-
- Member
- Posts: 71
- Joined: Wed Jan 25, 2017 3:37 pm
Do you want simple pascal compiler designed for boot loaders
May be in free from OGDOS developing time i'm write simple pascal compiler, which generates very small assembler listing.
No rtl, you must write rtl by yourself(i mean writeln, readln and etc), it's for size economy.
Simplified pascal sublang:
Only while and for loops
Only variables, no consts
No delete, pos and etc, you must implement it by yourself
Only 5 base types:
Integer, Byte, Char, String, SmallInt
Only tiny memory model
Do you interesting in that?
No rtl, you must write rtl by yourself(i mean writeln, readln and etc), it's for size economy.
Simplified pascal sublang:
Only while and for loops
Only variables, no consts
No delete, pos and etc, you must implement it by yourself
Only 5 base types:
Integer, Byte, Char, String, SmallInt
Only tiny memory model
Do you interesting in that?
Re: Do you want simple pascal compiler designed for boot loa
LOL.monobogdan wrote:i'm write simple pascal compiler, which generates very small assembler listing.
LOL.monobogdan wrote: No rtl, you must write rtl by yourself(i mean writeln, readln and etc), it's for size economy.
I got a C compiler much like that already.monobogdan wrote: Simplified pascal sublang:
Only while and for loops
Only variables, no consts
No delete, pos and etc, you must implement it by yourself
Only 5 base types:
Integer, Byte, Char, String, SmallInt
Only tiny memory model
Do you interesting in that?
Re: Do you want simple pascal compiler designed for boot loa
Writing a language compiler is great fun in its own right, but I see little prospect that anyone would be interested in using the compiler you describe.
-
- Member
- Posts: 71
- Joined: Wed Jan 25, 2017 3:37 pm
Re: Do you want simple pascal compiler designed for boot loa
But C language is for C coders.alexfru wrote:LOL.monobogdan wrote:i'm write simple pascal compiler, which generates very small assembler listing.
LOL.monobogdan wrote: No rtl, you must write rtl by yourself(i mean writeln, readln and etc), it's for size economy.
I got a C compiler much like that already.monobogdan wrote: Simplified pascal sublang:
Only while and for loops
Only variables, no consts
No delete, pos and etc, you must implement it by yourself
Only 5 base types:
Integer, Byte, Char, String, SmallInt
Only tiny memory model
Do you interesting in that?
Someone, love pascal, and so, free pascal is not dead. And it's funny.
-
- Member
- Posts: 71
- Joined: Wed Jan 25, 2017 3:37 pm
Re: Do you want simple pascal compiler designed for boot loa
Main goal is not only bootloaders, it's generate smallest code.iansjack wrote:Writing a language compiler is great fun in its own right, but I see little prospect that anyone would be interested in using the compiler you describe.
Re: Do you want simple pascal compiler designed for boot loa
I should repeat. LOL. Let me elaborate a bit. Making a compiler that would generate fastest or smallest code is not a simple or easy task. Get a modern book on compilers to see what I'm talking about. And then, perhaps, take a look at the code of a decent optimizing compiler to see how it implements those optimizations that lead to smaller or faster code (not that I expect you to understand anything in there, but you should at least appreciate the work others have put into an optimizer and get a feeling of how complex and hard it is and that you have a very little idea of this at the moment).monobogdan wrote:Main goal is not only bootloaders, it's generate smallest code.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Do you want simple pascal compiler designed for boot loa
Optimizing for small memory footprint is only valuable for some inexpensive, mass-produced embedded devices. For PCs, it really makes no sense to trade performance for size; code only takes a fraction of the memory data does.
Also, there are other bad mainstream languages out there, such as C, that most of us wish we could get rid of but cannot yet afford to do so because of all the existing code bases that need to be maintained. With Pascal, we absolutely can and, for the most part, already have. Don't let your nostalgia stop you from keeping with the times; with technology, you cannot afford to do so.
Also, there are other bad mainstream languages out there, such as C, that most of us wish we could get rid of but cannot yet afford to do so because of all the existing code bases that need to be maintained. With Pascal, we absolutely can and, for the most part, already have. Don't let your nostalgia stop you from keeping with the times; with technology, you cannot afford to do so.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Do you want simple pascal compiler designed for boot loa
No. I did write a kernel in Pascal, but for that I need a good compiler, not some bad implementation of a tiny subset. And FreePascal already exists; if you want to create something useful, maybe contribute to FreePascal if you have anything to contribute.monobogdan wrote:Do you interesting in that?
And finally, before you write compiler for writing bootloaders (which is a topic so specific that writing a compiler specifically for it is probably not a good idea), maybe you should first learn yourself how to write a bootloader, and why that typical minimal hack from the tutorials is not a proper bootloader, and how to do it right. Because if you don't know how to write a proper bootloader, you can't write a tool for creating one.
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Do you want simple pascal compiler designed for boot loa
Or better still, move along from boot loaders entirely and focus on an OS. As we have said many times before, here and in the wiki, focusing on the boot loader during an OS project makes as much sense as a dress designer spending years and years on developing a new way to sew, just because they didn't want to rely on existing sewing machines.
If the boot loader is your goal, then fine, work on that. But it isn't operating system design, despite what so many novices (including myself back in the day) initially think. Unless you have a specific, overriding reason why one of the existing boot loaders won't serve you, or you intend to make the boot loader itself your primary target, just pick one that's already there and use that. Otherwise, you are arguing over Mark Twain's proverbial skin of paint on the pinnacle of the Eiffel Tower.
And yes, I know how hypocritical I am being, but I actually have what I consider to be a reason for writing one, and I intend to spend a fair amount of time on it as a separate thing from my OS.
If the boot loader is your goal, then fine, work on that. But it isn't operating system design, despite what so many novices (including myself back in the day) initially think. Unless you have a specific, overriding reason why one of the existing boot loaders won't serve you, or you intend to make the boot loader itself your primary target, just pick one that's already there and use that. Otherwise, you are arguing over Mark Twain's proverbial skin of paint on the pinnacle of the Eiffel Tower.
And yes, I know how hypocritical I am being, but I actually have what I consider to be a reason for writing one, and I intend to spend a fair amount of time on it as a separate thing from my OS.
Last edited by Schol-R-LEA on Tue Jan 31, 2017 9:22 am, edited 2 times in total.
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.
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.
-
- Member
- Posts: 71
- Joined: Wed Jan 25, 2017 3:37 pm
Re: Do you want simple pascal compiler designed for boot loa
Before creating this topic, I calculated the possibilities and skills, so do not try to put me an idiotKevin wrote:No. I did write a kernel in Pascal, but for that I need a good compiler, not some bad implementation of a tiny subset. And FreePascal already exists; if you want to create something useful, maybe contribute to FreePascal if you have anything to contribute.monobogdan wrote:Do you interesting in that?
And finally, before you write compiler for writing bootloaders (which is a topic so specific that writing a compiler specifically for it is probably not a good idea), maybe you should first learn yourself how to write a bootloader, and why that typical minimal hack from the tutorials is not a proper bootloader, and how to do it right. Because if you don't know how to write a proper bootloader, you can't write a tool for creating one.
Re: Do you want simple pascal compiler designed for boot loa
I believe, most of us don't want or need the kind of compiler you're talking about (we don't see what important problems it would solve better than existing tools). We're also skeptical of your ability to do the optimizing part well. You appear overly optimistic.
But hey, if you still want to give it a try, please do. It will be a good learning journey if you don't quit too early.
But hey, if you still want to give it a try, please do. It will be a good learning journey if you don't quit too early.
-
- Member
- Posts: 71
- Joined: Wed Jan 25, 2017 3:37 pm
Re: Do you want simple pascal compiler designed for boot loa
Кто мы то? Я здесь одинalexfru wrote:I believe, most of us don't want or need the kind of compiler you're talking about (we don't see what important problems it would solve better than existing tools). We're also skeptical of your ability to do the optimizing part well. You appear overly optimistic.
But hey, if you still want to give it a try, please do. It will be a good learning journey if you don't quit too early.
Re: Do you want simple pascal compiler designed for boot loa
Writing a compiler is not easy -- nor is an optimizing one. If you continue I remember seeing a tutorial on writing a compiler in pascal. There are also many examples if you search "simple compiler source code."monobogdan wrote:Кто мы то? Я здесь одинalexfru wrote:I believe, most of us don't want or need the kind of compiler you're talking about (we don't see what important problems it would solve better than existing tools). We're also skeptical of your ability to do the optimizing part well. You appear overly optimistic.
But hey, if you still want to give it a try, please do. It will be a good learning journey if you don't quit too early.
-
- Member
- Posts: 71
- Joined: Wed Jan 25, 2017 3:37 pm
Re: Do you want simple pascal compiler designed for boot loa
Google translate is not your friend.ronsor wrote:Writing a compiler is not easy -- nor is an optimizing one. If you continue I remember seeing a tutorial on writing a compiler in pascal. There are also many examples if you search "simple compiler source code."monobogdan wrote:Кто мы то? Я здесь одинalexfru wrote:I believe, most of us don't want or need the kind of compiler you're talking about (we don't see what important problems it would solve better than existing tools). We're also skeptical of your ability to do the optimizing part well. You appear overly optimistic.
But hey, if you still want to give it a try, please do. It will be a good learning journey if you don't quit too early.
And so, i'm write compilers in past.
See my github repo.
http://github.com/monobogdan/ngc
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Do you want simple pascal compiler designed for boot loa
I know that you are focused on the target as much as on the language and the compiler, but you might want to take this discussion to our sister site, https://forum.compilerdev.org, if only because, well, it's more directly on topic there.
Also - and please pardon the shameless promotion - that site could you some love. I know quite a few people here are interested in language design and compiler development as well as operating systems, but it's a relatively new site so there hasn't been a lot of momentum there yet. We could use more participants there.
Also - and please pardon the shameless promotion - that site could you some love. I know quite a few people here are interested in language design and compiler development as well as operating systems, but it's a relatively new site so there hasn't been a lot of momentum there yet. We could use more participants there.
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.
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.