Previous 1
Topic: Get with the program
Totage's photo
Thu 06/21/12 06:03 PM
Where should I start to get back into programming?

I want to create my own OS. I was thinking about doing it in MASM.

I've dabbled in various BASIC, C/C++, and a few other languages. I do web scripting, mainly HTML and PHP.

Is MASM the best choice? I was thinking C/C++ would probably be the best choice, and a *nix environment, but I'm using Windows 7 for now.

I will have an extra laptop in a few months, one I will feel comfortable dual booting with Ubuntu.

Any ideas or suggestions?

dirtymindedgeek's photo
Thu 06/21/12 08:55 PM
Perl scripting, Linux administration & PHP seem to be popping up in my inbox all the time for jobs.

Totage's photo
Thu 06/21/12 09:00 PM
I already do that.

I'm looking for programming.

I want to eventually develop my own OS and programming language, but can't decide where to start.

dirtymindedgeek's photo
Thu 06/21/12 09:09 PM

I already do that.

I'm looking for programming.

I want to eventually develop my own OS and programming language, but can't decide where to start.


Well 1st off you don't want to have to re-invent the wheel unless that wheel doesn't fit.
Someone may already be working on exactly what you want to do and combined effort usually produces greater results.

Picking a language and then learning it through and through only to find that it's no longer supported by hardware may be a kick in the teeth.

Have you considered assisting ubuntu's programming base?
Or do you already have a nitche use in mind?

Totage's photo
Thu 06/21/12 09:17 PM
I just want to do it because I can, more so for a hobby. I do have an idea, but I can't share it ATM.

dirtymindedgeek's photo
Thu 06/21/12 09:31 PM
No sense throwing learning curves at you unless there's a specific function you need supported.

Whatever your idea is - look for what it will require, do you need direct hardware access or can you virtualise it?

How much memory will you need to access? (32 bit vs. 64 bit coding)
I'm no software engineer but knowing where you want to head will give you the answer to your question.

Let that idea you can't share right now - pick the language you need to use.

Or if any will work... pick the one you have the least problem using.

cls
@echo off
echo make up your mind.
pause
cls
echo knock knock neo.
pause
cls
end


Totage's photo
Thu 06/21/12 09:43 PM

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive

; include files
; ~~~~~~~~~~~~~
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\include\msvcrt.inc
include \masm32\include\dialogs.inc
include \masm32\macros\macros.asm

; libraries
; ~~~~~~~~~
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\oleaut32.lib
includelib \masm32\lib\msvcrt.lib


HllWrld PROTO :DWORD,:DWORD,:DWORD,:DWORD

.data?
hInstance dd ?

.code

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

start:

mov hInstance, FUNC(GetModuleHandle,NULL)

call main

invoke ExitProcess,eax

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

main proc

Dialog "Meh...", \ ; caption (Title bar)
"MS Sans Serif",10, \ ; font,pointsize
WS_OVERLAPPED or \ ; styles for
WS_SYSMENU or DS_CENTER, \ ; dialog window
2, \ ; number of controls
50,50,150,80, \ ; x y co-ordinates
1024 ; memory buffer size

DlgButton "OK",WS_TABSTOP,48,40,50,15,IDCANCEL
DlgStatic ":\", \
SS_CENTER,2,20,140,9,100

CallModalDialog hInstance,0,HllWrld,NULL

ret

main endp

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

HllWrld proc hWin:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD


.if uMsg == WM_INITDIALOG
invoke SendMessage,hWin,WM_SETICON,1,
FUNC(LoadIcon,NULL,IDI_ASTERISK)

.elseif uMsg == WM_COMMAND
.if wParam == IDCANCEL
jmp quit_dialog
.endif

.elseif uMsg == WM_CLOSE
quit_dialog:
invoke EndDialog,hWin,0

.endif

xor eax, eax
ret

HllWrld endp

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

end start

mrparadoxical's photo
Thu 06/21/12 11:02 PM
Edited by mrparadoxical on Thu 06/21/12 11:03 PM
for someone that wants to create their own OS, writing Microsoft assembler code is lame.

Mirage4279's photo
Fri 06/22/12 12:49 AM
I would recomend C/C++ for a couple different reasons. I program in Java ande much of Java is written in native code (which is presumably C/C++ most of the time native code is mentioned it certain contexts)

C/C++ can preform functions that use pointers to to refrence locations of memory direclty instead of data stuructures such as Vector, ArrayList and array classes that Java uses. Not to say Java is not good enough to write an OS it is and I do believe it is out there as a matter of fact. But in Java we use native methods to create solutions such as refrencing memory directly using a pointer to reduce overhead operations. needles to say you probably have an easier time communicating with the hard ware directly such as in the kernal layer of the OS or the hardware abstraction layer (HAL) using a native language such as C/C++ although something such as VB .NET may be just as good or better than C/C++...I do not know.

Totage's photo
Fri 06/22/12 05:01 AM
But would it be possible in masm?

Mirage4279's photo
Fri 06/22/12 06:04 AM
Not too familiar with it to tell you to be pertly honest

mrparadoxical's photo
Fri 06/22/12 09:51 AM

But would it be possible in masm?


Yes it would be possible. It would be more secure in LSB or even Java.

Totage's photo
Fri 06/22/12 11:43 AM
I'm going back to C/C++. I'm not liking MASM.

Mirage4279's photo
Fri 06/22/12 06:07 PM

I'm going back to C/C++. I'm not liking MASM.


I agree with you

Totage's photo
Fri 06/22/12 06:26 PM
It would be nice to find a free GUI builder for c/c++. :(

Mirage4279's photo
Fri 06/22/12 06:30 PM

It would be nice to find a free GUI builder for c/c++. :(



Ummmm have you ever gone to the microsoft web-site and downlaoded their editor before???

That should have one on it...I remember it was in like chapter one of my text-book for creating frames without typing out the code...

Not the easiest program to use if you do not know how to do it though if I remeber right...

mrparadoxical's photo
Fri 06/22/12 06:38 PM

It would be nice to find a free GUI builder for c/c++. :(


There is, Qt Creator IDE. It works best on Linux but works very well on windblows.

Totage's photo
Fri 06/22/12 06:47 PM


It would be nice to find a free GUI builder for c/c++. :(



Ummmm have you ever gone to the microsoft web-site and downlaoded their editor before???

That should have one on it...I remember it was in like chapter one of my text-book for creating frames without typing out the code...

Not the easiest program to use if you do not know how to do it though if I remeber right...


LOL, I actually just uninstalled it.



It would be nice to find a free GUI builder for c/c++. :(


There is, Qt Creator IDE. It works best on Linux but works very well on windblows.


I'll try it. TY

Totage's photo
Fri 06/22/12 07:29 PM
OMM! QT better be worth it. It's monstrous! lol

Looks pretty promising though. Hopefully it will be what I'm looking for.

dirtymindedgeek's photo
Fri 06/22/12 07:49 PM

OMM! QT better be worth it. It's monstrous! lol

Looks pretty promising though. Hopefully it will be what I'm looking for.


Good luck sir and I knew there were geekier people than me out there.

+1 internets for having brain cells left.

Previous 1