News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

starting from the ground up.. going crazy!

Started by psi_chemie, September 05, 2005, 01:49:42 PM

Previous topic - Next topic

psi_chemie

Greetings! I hope this is a story that has played out many times before. I just can't find any such accounts. The internet is an obfuscation.  I feel like there is some kind of conspiracy going on. The line of smileys above this window is really freaking me out, and it makes my cursor flicker. I'll have to figure out how to turn that off. There are always so many settings to program, for every little thing you want to do. This brings me to my point. I am trying to return to the world of ASCII. Something like on the TRS-80 I had.

I am 31 and got pretty good at computers starting around 4th grade with green screens and then continuing into junior high, learning a bit of various programming languages. I got away from computers for a while, all through college. Then when windows came out with its fancy pants multimedia and the internet came up and all that, I got back into them. But I found I was curious about how things really work, and anyways, I started asking questions like: If the CPU is a binary processor, what does the actual string of 0s and 1s look like, that goes into this processor in the form of electric signals and runs stuff and what not. Well, it looks like 0s and 1s. Then there is hex. I found a utility that lets you see a an executable file in the form of hex. Cool stuff. Then I found out about assembly.

I wanted to know how disk reading and writing was done, at a signal level. I found assembly code for dos-like operating systems, and found the code fascinating. Moving and pushing and rotating, all the most reduced operations of a computer.

I want to learn how this stuff really works. So I have been messing around with assemblers and source code I find on the internet. Before I really can get into this, I need to figure out why I am getting errors when I am trying to assemble sources I find.

I have MASM32 and HLA and all this crap that I have gotten to do some stuff, but I can't figure out why it won't assemble source for Rx Dos that I found.

Also, most of the examples that came with HLA won't compile. I think I have the path stuff correct.

Why do I get errors when I try and assemble an Rx Dos source? It does say that the sources are for MASM 5.1, which I can't find. I found a util that is supposed to work as MASM 5.1, this gives me the same errors.

I am feeling ill, so I will stop writing for the moment. I hope this has been entertaining.

If there are any tutorials or user guides (not what came with HLA and MASM, I don't understand any of that) for learning how to use assembly tools, I'd appreciate. Yes I read art of assembly.

Please help. Once I figure out this disk access stuff, things will start making sense.

hutch--

psi,

The trick is to conquer one platform at a time, particularly if you have not done tis stuff for a while. Dos is past it and the reference material is getting hard to get. We have a 16 bit forum where the members will help you out if they can but the real action is in 32 bit code.

I can heartily recommend HLA to get you up and going as it properly caters for people in your position. MASM is not for the faint of heart and unless you have experience in both Windows API programming AND assembler programming, it a very hard road to hoe. There are other good assemblers around as well but the are at least as hard as masm to learn and use.

The other alternative is to get used to a good low level compiler as you will learn much from writng that type of code and you can always come back later if you are interested in assembler.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

psi_chemie

Hutch, thanks for the reply. I appreciate it.

Question: Can you suggest a low level compiler? I'm not quite sure I know what you mean.
Question: Is HLA a low level compiler?

Question: Or were you thinking of basic or C or something?

My OS is win98se.

So DOS is not what is loading on a normal boot of my machine? I assume when the computer turns on, my BIOS looks for a boot location of some kind. Normally a spot on my HD.

Questions: So what is the first thing that is read? Not command.com?

I am trying to avoid paying to take classes to teach me this stuff, in case you can't tell. I think if I had executables that would work, I'd be able to teach myself plenty.

The problem is, programming software does not seem to be self-contained. I download a program that is supposed to let me program. I down load code. I see that code is basically written in a text editor, and then a compiler operates on the text file. I have a bit of a problem with this though. I wish that you had two things. A text file, and a compiler. Two files only. You ran run the compiler, and it works on the text file, and pumps out an executable. But instead what I find is, the compiler needs all kinds of other files to operate. It needs links to all kinds of files in other folders. Libraries, include files, what not. I spend my time messing around trying to get all that to work (haven't yet, for anything, C, asm, basic).

Could you please suggest a download that I can access, where when I unpack the file downloaded, the contents all go into one folder, and this folder contains all the files needed for me to write code in a text editor, and compile that? Something that is command line, doesn't have all kinds of windows popping up.

OK I did get free basic to work. Is there a forum that I should be in? I get the feeling this is not the right forum, if my focus is to shift away from assembly now.

OK, I notice that the real goings on of programs is with libraries. I find an example in free basic, for example :), and the code refers to libraries. But what I wanted to learn was the stuff in the libary. Like I open up an example code for using the mouse to draw on the screen and find that I have to then go and look in libraries the code calls. By the time I do this I forget in my head what I was originally trying to figure out. Annoying. This is why I started to look at assembly. I thought that I would be able to figure out I/O workings.

I'm not sure what I am trying to do anymore.


hutch--

psi,

It really depends on what you are familiar with, a basic compiler will get you going but you may learn a lot of bad habits with it. A C compiler is a good tool but a lot of work and an assembler is some powers harder again. I am not trying to scare you off but tell you the truth so you start somewhere where you can succeed rather than find it so hard you give up.

The type of questions you are asking suggest HLA as its pointed at people who need to learn basic stuff while being able to do low level 32 bit Windows stuff.

Yes win98se does have DOS below it but you would be writing directly in DOS to do it properly which is not easy to do any more as the tools are ancient and hard to get.

I don't claim to be ale to put a really accurate handle on HLA but its a hybrid of an extended assembler with its own macro system, syntax and the like that can use either MASM or FASM to produce the output files.

DOS IO is crude but accessible if you know what you are doing, win32 IO is very complicated at the low level end where you need the expertise to write drivers specfic to each OS version to do it properly.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

AeroASM

Quote from: psi_chemie on September 05, 2005, 03:13:56 PM
Could you please suggest a download that I can access, where when I unpack the file downloaded, the contents all go into one folder, and this folder contains all the files needed for me to write code in a text editor, and compile that? Something that is command line, doesn't have all kinds of windows popping up.

Get rid of all your other asm downloads and download masm32 from www.masm32.com

When you install it, it self-extracts into c:\masm32. To uninstall it, just delete c:\masm32.
It comes with all the libraries you will ever need, all the include files etc. It is "ready to go".

however, what you have said suggests you you do not want to learn win32 asm.

In .NET, to draw a picture on the screen, you call a function in System.Forms.Drawing. In win32 asm, you call an API which does the hard work for you. All win32 programming, including in asm, has been reduced to telling the OS what you want done rather than doing it yourself.

But you don;t want to call another function, you want to actually set and reset the bits in video memory to control individual screen pixels. You want to send individual control messages to the hard drive and read each sector yourself.

Making your own OS would be perfect for you: you would have to learn all these things to control the computer. Unfortunately, making an OS is very hard and there is a lack of good tutorials beyond the bootloader stage.

tenkey

You will not be able to assemble any MASM 5.1 code with MASM 6 (which is packaged with MASM32) unless you turn on the 5.1 compatibility mode.

See third post in this thread.
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8