English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 23 April 2010, 19:45   #1
Nostalgeek
OT Whore
 
Nostalgeek's Avatar
 
Join Date: Nov 2008
Location: Switzerland
Age: 41
Posts: 290
Quick x86 Assembler question :(

Hi guys, nothing to do with Amiga assembly unfortunately, but my question is maybe pretty easy to some of the guru's out there....

I'm getting into x86 assembler, by pure fun and interest

Very enjoyable so far, feels good to have the hands dirty again.

Now my problem. I started learning with a few tutorials, on my XPSP3 machine at work, compiling using TASM 5.0. Works flawlessly.

Now I'm back at home on my Win7 32bits computer, configured everything the same, and every single bit of compiled code gives me a beautiful

"The NTVDM CPU has encountered an illegal instruction. Press close blablabla"

Now my wild guess would be that win7 protects the memory and doesn't let me access it?

What should I do?

1) Should I use another and more modern compiler than TASM?
2) Should my code be different somewhat?
3) Should I just forget to code assembler on Win7?

Here's my code for a wonderful piece of software that displays an "A":

Quote:
MAIN SEGMENT
ASSUME DS:MAIN,ES:MAIN,CS:MAIN,SS:MAIN

START:
MOV AH,02h
MOV DL,41h

INT 21h
INT 20h
MAIN ENDS
END START
Thank you SO MUCH in advance for your help...There are probably better places to post that on the web, but as this feels like home and also gathers a whole lot of different experts on a wide spectrum of areas, I'm trying here first

And if an admin thinks this fits better in an OT section, feel free to move it, it won't hurt my feelings at all

Cheers!
Nostalgeek is offline  
Old 23 April 2010, 19:48   #2
Nostalgeek
OT Whore
 
Nostalgeek's Avatar
 
Join Date: Nov 2008
Location: Switzerland
Age: 41
Posts: 290
Btw, it compiles without any error and the code is a rip-off from the tutorial, I'm using this code and not something I did myself because, it worked fine on my XP PC, so I know the code is ok, and it's ultra simple.

And coding the same using the "debug" commands works fine...does the debug open a "free" area of the memory, while the compiled program doesn't? Still a mistery to me, I need some light!!
Nostalgeek is offline  
Old 23 April 2010, 20:11   #3
Nostalgeek
OT Whore
 
Nostalgeek's Avatar
 
Join Date: Nov 2008
Location: Switzerland
Age: 41
Posts: 290
ok, a quick chat with StingRay and Jope on IRC solved it

Will be doing it under DOSbox. making bios calls under windows 7 is indeed trying to kill a fly with a gun, I know understood that, and the fact that it worked under xp is not gonna help me ^^
Nostalgeek is offline  
Old 18 May 2010, 00:00   #4
absence
Registered User
 
Join Date: Mar 2009
Location: moon
Posts: 373
If you're really crazy about coding assembly for Windows you could always use MASM, NASM or something that generates Windows object files that can be linked into a Windows executable that will work in Windows 7. Of course you'll have to use the Windows API rather than DOS interrupts to do stuff like printing letters to the console.
absence is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC Assembler return value question... NovaCoder Coders. Asm / Hardware 0 23 June 2012 07:11
a quick question extralife support.Hardware 3 02 January 2009 14:00
Quick question's noxenlux New to Emulation or Amiga scene 3 03 December 2008 19:26
A Quick Question Reps Amiga scene 5 27 October 2003 10:42
Just a quick Question ! RetroMan project.SPS (was CAPS) 4 08 April 2003 11:00

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:10.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08722 seconds with 13 queries