News:

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

Assembler programs works on every computer?

Started by lecomdeuvirtu, July 11, 2006, 03:22:39 PM

Previous topic - Next topic

lecomdeuvirtu

Hi,
I want to know if its possible that an assembler program can't work on all computers.
The thing is that im seeing an Assembler course, i made a program that works on my computer but not on my teachers computer. So i failed the course but i want to get arguments to convince my teacher that my program does work.

Thanks.

Wistrik

I ran into this years ago for a science fair project. (I was writing the score-keeping program.)

I developed the program on one Apple computer, and it failed to run on another Apple computer. Why? Different hardware/OS versions. And this program was in BASIC.

It's hard to elaborate since you don't specify details about your computer and your teacher's computer. Are they both PCs or Apples? Do they run the same OS version? Is the hardware similar, if they are the same type of computer?

lecomdeuvirtu


Wistrik

There are lots of things that can do this. Drivers, hardware, installed features, etc. This is why game developers have such a hard time because there's always someone out there with a computer that should work, but doesn't. If your teacher is trying to build your source code into an executable, his make file might be different than yours, or his assembler's configuration could be different.

This is true for any language you use, but especially for assembly because it lets you do things high level languages won't allow.

arafel

Make sure you application can run from a restricted privileges account. Most users use Administrator account by default. The app may run on you pc, but fail on the PCs at uni, since they usually set to some sort of restricted privileges account.

Also check if your application relies on some system specific files/settings to run. Those may differ from PC to PC. .

Tedd

It's possible that your program tried to do something that uses a particular cpu/OS feature of your computer that didn't work on your teacher's computer. If it was just using the 'normal' instructions then there shouldn't really be a problem.
If you want to post the code (if you can) then we can look and try to see what the problem was :wink
No snowflake in an avalanche feels responsible.

Casper

Chances are, the teacher is using a different assembler, that can cause serious problem as most assemblers are NOT cross-compatible.  Only POASM and MASM are to some degree compatible, all else is worse.  A UNI type assembler would be A86.

Paul

lecomdeuvirtu

Here is the code: emulador.asm

The program ask for a file, here is the file: simple.bin

This program is an emulator, the simple.bin file has the instrucions the emulator has to do, it is written in binary code.

Thanks.

[attachment deleted by admin]

P1

Quote from: lecomdeuvirtu on July 11, 2006, 03:22:39 PMSo i failed the course but i want to get arguments to convince my teacher that my program does work.
Fix the problem for a grade.   :clap:

Could you give more details about error and the symptoms, when and where it fails?  Did you forget about the write protect on the floppy?

Is it possible to demostrate the program on your computer for your grade?

Regards,  P1  :8)

Casper

Also, your batch file assumes that your teacher has environment variables set to the masm32 package.  This is probably NOT the case.  You probably should add a set command...

Quoteecho off
set BIN=\masm32\bin
if "%2" == "" goto sinlist
%bin%\ml /c /coff /Cp /Fl%1.%2 /Sn %1.asm
if errorlevel 1 goto salir
goto encadenar
:sinlist
if "%1" == "" goto sinparam
%bin%\ml /c /coff /Cp %1.asm
if errorlevel 1 goto salir
:encadenar
%bin%\link /SUBSYSTEM:CONSOLE /LIBPATH:d:\masm32\lib %1.obj
if errorlevel 1 goto salir
del %1.obj
goto salir
:sinparam
echo El primer parametro es el nombre del archivo (se supone apellido ASM)
echo El segundo parametro es el apellido para el listado (el nombre se supone igual al del ASM)
echo Si no hay segundo parametro, no se saca listado
:salir

Paul

akalenuk

Quote from: lecomdeuvirtu on July 11, 2006, 03:22:39 PM
I want to know if its possible that an assembler program can't work on all computers.
The thing is that im seeing an Assembler course, i made a program that works on my computer but not on my teachers computer.

Such things happen all the time. Not only with asm. It is often due to inacurate memory operations. Something that coded incorrectly, but works on your machine, goes unnoticed until you test it in any other conditions. Just look through your code once again, this may solve the problem.

Quote from: lecomdeuvirtu on July 11, 2006, 03:22:39 PM
So i failed the course but i want to get arguments to convince my teacher that my program does work.

Anyhow, the program should work on arbitrary machine, so your teacher is not that wrong. Testing is the part of the development.