Welcome! Log In Create A New Profile

Advanced

Debug

Posted by Anonymous User 
Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
Debug
February 28, 2008 11:35AM
Hismoking smiley

I have been traying to assemble the program given on page 32 of the stufy guide without success.Please help! I've jst followed all the steps in the guide, actually I'm using the program from the unisa computers. How do I see if my program has an error when I'm assembling.
Re: Debug
February 28, 2008 09:56PM
If you have typed in the source code exactly as given then the problem may be on how you are invoking nasm. Appendix B.2 explains the use of the "as.bat" batch file:
as prog1
or typing it as:
nasm -f bin prog1.asm -o prog1.com -l prog1.lst
Anonymous User
Re: Debug
March 03, 2008 09:28AM
I'v just done everything.

I'v used edit/Notepad to write the following code:
bits 16
org 0x100
jmp main
message: db 'Hello World.',0ah,0dh,'$'
main: mov dx,message
mov ah,09
int 21h
int 20h

then I saved it as "prog1.asm" in "D:\C221>" and I made copies of nasm.exe into this directories, actually C221 contain the files(as.bat, Nasm.exe, prog1.asm, uninstall.exe, uninstall.ini) and I typed "D:\C221>as prog1" to assemble the program, here everything goes well. My problem is when I try to run the program by typing "D:\C221>prog1" then I get the following respond:
'prog1' is not recognized as an internal or external command,
operable program or batch file.


PLEASE HELP ME!
Anonymous User
Re: Debug
March 03, 2008 12:49PM
You guys may be having the same trouble as we did over the years. nasm.exe doesn't work on modern windows. Trawl the net for nasmw.exe and modify your bat file accordingly. You should find joy. Pisses me off that unisa still ships nasm.exe on their disk.
Anonymous User
Re: Debug
March 03, 2008 01:31PM
nasm works fine for me and I'm just using good ol' win XP. If you do dir on that directory (or browse to it), do you see prog1.com ?
Anonymous User
Re: Debug
March 04, 2008 10:33AM
No! prog1.com is supposed to be created by nasm/as.bat to unable me to run the program.

THIS IS WHAT I GET:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\unisa\nasm>D:

D:\>cd\c221

D:\c221>as prog1

D:\c221>nasm -f bin prog1.asm -o prog1.com -l prog1.lst
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.
Exiting due to signal SIGSEGV
General Protection Fault at eip=0002bad3
eax=fffd0008 ebx=000001ff ecx=0000029f edx=fffd0000 esi=00000008 edi=00000000
ebp=0008a124 esp=0008a114 program=D:\C221\NASM.EXE
cs: sel=01a7 base=029f0000 limit=7d5fffff
ds: sel=01af base=029f0000 limit=7d5fffff
es: sel=01af base=029f0000 limit=7d5fffff
fs: sel=017f base=0000f3e0 limit=0000ffff
gs: sel=01bf base=00000000 limit=7ffeffff
ss: sel=01af base=029f0000 limit=7d5fffff

Call frame traceback EIPs:
0x0002bad3
0x0002ba59
0x0002efff
0x0002f2b3
0x0002f6de
0x0002ac8b
C:\unisa\nasm>prog1
'prog1' is not recognized as an internal or external command,
operable program or batch file.

C:\unisa\nasm>
avatar Re: Debug
March 04, 2008 01:23PM
Did you compile the program at d:\c221\ and then try to run it at c:\unisa\nasm\ ?

This will not work, because the program is not at c:\unisa\nasm\.

What I suggest is, go to d:\c221\ enter dir and press enter.
Make a printout of the output, and display it in this thread.
Maybe we can help if we know what kind of drive D: is?
Re: Debug
March 05, 2008 10:08PM
Dude, use cmd.exe to get a command prompt, you are using command.com.
Anonymous User
Re: Debug
March 06, 2008 05:14AM
Anonymous User
Re: Debug
March 06, 2008 01:40PM
I finally got the answer:smoking smiley
I'v jst deleted the short-cut provide by unisa from the desktop, then I clicked start/programs/directories/command prompt then right clicked to send it to desktop and the renamed it as dos prompt for nasm. Lastly I right clicked on the short cut sent to the desktop/shortcut/start in: and enter c:\unisa\nasm and press OK. After what I did everything went well and I'v already finished my first assignment.

Guess what? every time I switch on unisa PC's I must follow the steps above. If anyone Is experiencing the same problem, PLEASE follow the steps above...THANKS A LOT for ur help.smoking smiley
avatar Re: Debug
March 06, 2008 05:50PM
Glad to hear that!smileys with beer
avatar Re: Debug
March 06, 2008 09:06PM
I have Windows XP, and created the shortcut to NASM as instructed in the Unisa Software disk. I never needed to recreate the short - might be because of using XP?
Re: Debug
March 06, 2008 10:07PM
@Reanie: Or maybe your PC it is not a Unisa PC, on which every tom, dick and harry goes and reinstall the software, re-creating the incorrect short-cut....

@40959562: it's a lot easier to just type in cmd from the start/run. You can press the "windows" key + R to open the run dialog box thumbs up
avatar Re: Debug
March 07, 2008 08:17AM
Ok, fortunate enough to have a PC at home.
Can't even imagine how it must be to try and organise your day to make time to go at work at Unisa?
Re: Debug
March 07, 2008 09:37AM
Yip, Some have it easier than others...
It is actually frightening to think how many SOC students have none or very little "computer literacy". That why there is subjects like CEM101 and COS101 I suppose. But you can only become more "computer Literate" through practice and experience.

- The more you practice the luckier you get.
cda
thumbs down Re: Debug
April 05, 2008 11:42PM
What if you don't have Windows at all? Between having to do Delphi and now `debug` I'm horrified at how non vendor neutral the syllabus is as far as examinable content goes (re the usage of debug). Especially since 80% of the machines I work on here are Linux - and I'd really like to keep it that way. Even the interrupts used are purely DOS ones.

At least it sort of works on Vista, or else I'd be very seriously unhappy.
Re: Debug
April 07, 2008 12:21PM
40959562 Wrote:
-------------------------------------------------------
> I finally got the answer:smoking smiley
> I'v jst deleted the short-cut provide by unisa
> from the desktop, then I clicked
> start/programs/directories/command prompt then
> right clicked to send it to desktop and the
> renamed it as dos prompt for nasm. Lastly I right
> clicked on the short cut sent to the
> desktop/shortcut/start in: and enter c:\unisa\nasm
> and press OK. After what I did everything went
> well and I'v already finished my first
> assignment.
>
> Guess what? every time I switch on unisa PC's I
> must follow the steps above. If anyone Is
> experiencing the same problem, PLEASE follow the
> steps above...THANKS A LOT for ur help.smoking smiley

Thanks, this helped me alot
Re: Debug
June 08, 2008 02:28PM
Can somebody PLEASE help?

I m still struggling to get NASM to work on my pc.

I'm getting this error:

C:\unisa\nasm>as prog1

C:\unisa\nasm>nasm -f bin prog1.asm -o prog1.com -l prog1.lst
Exiting due to signal SIGSEGV
General Protection Fault at eip=0002bad3
eax=ffcd0010 ebx=000000ff ecx=000002aa edx=ffcd0000 esi=00000010 edi=00000001
ebp=00089d80 esp=00089d70 program=L??
cs: sel=01a7 base=02aa0000 limit=7d54ffff
ds: sel=01af base=02aa0000 limit=7d54ffff
es: sel=01af base=02aa0000 limit=7d54ffff
fs: sel=017f base=0000e1b0 limit=0000ffff
gs: sel=01bf base=00000000 limit=7ffeffff
ss: sel=01af base=02aa0000 limit=7d54ffff

Call frame traceback EIPs:
0x0002bad3
0x0002ba59
0x0002abc2
0x0002ac79

I ve also tried to install nasmw that i got of the net but also couldn t assemble program using this version.

Any help appreciated
Sorry, only registered users may post in this forum.

Click here to login