Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 22nd, 2006, 2:47 PM   #1
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
32 bit assembler on x64 windows

I guess I'm looking for an environment that allows me to code in 32 bit assembly on my x64 bit version of windows. I know that I should probably dual boot into x86 windows but I'd rather keep that space for more important things. And besides, it's a lot easier to use a program than a new OS. Any help would be most appreciated.
__________________
Perhaps I should have a sticky topic for all of the times I "return" to this forum instead of a new one every time.
Indigno is offline   Reply With Quote
Old Aug 22nd, 2006, 3:02 PM   #2
Random Spirit
Unverified User
 
Join Date: Aug 2006
Posts: 88
Rep Power: 0 Random Spirit is on a distinguished road
Well your xp x64 windows can still run 32 bit code so you wont need a special assembler for x64 just any x86 one will do.

The one i used is MASM32

http://www.masm32.com/

the website is bad on the eyes, but its meant be compatible with MASM. You can use any editor to write the source and then just assemble it with MASM32. Its still only 32-bit, but unless you really need to program in 64 bits it is all you will need.

edit:- there is also NASM which is good too.

http://sourceforge.net/projects/nasm
Random Spirit is offline   Reply With Quote
Old Aug 22nd, 2006, 3:27 PM   #3
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
I'd recommend FASM. With that you'd be able to write 32bit or 64bit programs as you please.
__________________
Visit my website BinaryNotions.
Eoin is offline   Reply With Quote
Old Aug 22nd, 2006, 3:29 PM   #4
Random Spirit
Unverified User
 
Join Date: Aug 2006
Posts: 88
Rep Power: 0 Random Spirit is on a distinguished road
Eoin that looks great. I never heard of FASM before. Thanks.
Random Spirit is offline   Reply With Quote
Old Aug 22nd, 2006, 4:48 PM   #5
Mad_guy
Hobbyist Programmer
 
Mad_guy's Avatar
 
Join Date: Oct 2004
Location: Sandstorm, Techno Club
Posts: 239
Rep Power: 4 Mad_guy is on a distinguished road
Send a message via AIM to Mad_guy Send a message via MSN to Mad_guy
FASM is pretty good, you can even write 64-bit device drivers in it.

Another 64-bit assembler is GoAsm, and it's pretty slick but from what I hear, it has a week macro system (especially compared to systems like MASM.)
__________________
os: mac os 10.5.4
revision control: git
editor: emacs

site
Mad_guy is offline   Reply With Quote
Old Aug 22nd, 2006, 5:17 PM   #6
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
Quote:
Originally Posted by Mad_guy
...it has a week macro system (especially compared to systems like MASM.)
FASM's macro system is also weak, but you can do some fancy things with it once you get to grips with it. I point to my own inlineable procedures as a shameless plug .
__________________
Visit my website BinaryNotions.
Eoin is offline   Reply With Quote
Old Aug 22nd, 2006, 10:34 PM   #7
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
Which one is best for beginners?
__________________
Perhaps I should have a sticky topic for all of the times I "return" to this forum instead of a new one every time.
Indigno is offline   Reply With Quote
Old Aug 23rd, 2006, 1:33 AM   #8
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4 Klarre is on a distinguished road
I can't say something about FASM or NASM. I have only been using TASM and MASM. I should recommend MASM to a beginner. You can almost write code as you were writing C code using MASM. It is very simple thanks to its macro system. You will also get a lot of tutorials and sample applications with the assembler.
__________________
http://www.klarre.se
Klarre is offline   Reply With Quote
Old Aug 23rd, 2006, 8:55 AM   #9
Cache
Hobbyist
 
Join Date: Sep 2005
Posts: 261
Rep Power: 4 Cache is on a distinguished road
FASM mixed with the Win32 API is pretty easy to pick up. I'd had a go with MASM and not really gotten anywhere, tried FASM and had a working GUI'd Win32 app running within a few hours.

This is what I came up with. It's laughable in just about every respect, but it's a start. I call it 'FDelete' because it's made with FASM and it deletes things:

asm Syntax (Toggle Plain Text)
  1. format PE GUI 4.0
  2. entry start
  3.  
  4. include '%fasminc%\win32a.inc'
  5.  
  6. ID_EDIT = 101
  7. ID_DIALOG = 50
  8. MB_INFO = MB_OK+MB_ICONINFORMATION+MB_SETFOREGROUND
  9. MAX_PATH = 100h
  10.  
  11. section '.data' data readable writeable
  12.  
  13. _edittext rb MAX_PATH
  14. _strbuff rb 1024
  15.  
  16. _progname db 'FDelete',0
  17. _cnd db 'Could not delete: %s',0
  18. _fsd db '"%s" successfuly deleted',0
  19.  
  20. section '.code' code readable executable
  21.  
  22. start:
  23. invoke GetModuleHandle,0
  24. invoke DialogBoxParam,eax,ID_DIALOG,HWND_DESKTOP,DialogProc,0
  25. invoke ExitProcess,0
  26.  
  27. proc DialogProc uses ebx esi edi,hwnddlg,msg,wparam,lparam
  28. cmp [msg],WM_COMMAND
  29. je wmcommand
  30. cmp [msg],WM_CLOSE
  31. je wmclose
  32. xor eax,eax
  33. jmp finish
  34. wmcommand:
  35. cmp [wparam],BN_CLICKED shl 16 + IDOK
  36. jne processed
  37. invoke GetDlgItemText,[hwnddlg],ID_EDIT,_edittext,MAX_PATH
  38. cmp eax,0
  39. jbe processed
  40. invoke DeleteFile,_edittext
  41. cmp eax,0
  42. jne success
  43. jmp failure
  44. success:
  45. cinvoke wsprintf,_strbuff,_fsd,_edittext
  46. jmp show
  47. failure:
  48. cinvoke wsprintf,_strbuff,_cnd,_edittext
  49. show:
  50. invoke MessageBox,[hwnddlg],_strbuff,_progname,MB_INFO
  51. jmp processed
  52. wmclose:
  53. invoke EndDialog,[hwnddlg],0
  54. processed:
  55. mov eax,1
  56. finish:
  57. ret
  58. endp
  59.  
  60. section '.idata' import data readable writeable
  61.  
  62. library KERNEL32,'KERNEL32.DLL',\
  63. USER32,'USER32.DLL'
  64.  
  65. import KERNEL32,\
  66. GetModuleHandle,'GetModuleHandleA',\
  67. ExitProcess,'ExitProcess',\
  68. DeleteFile,'DeleteFileA'
  69.  
  70. import USER32,\
  71. DialogBoxParam,'DialogBoxParamA',\
  72. GetDlgItemText,'GetDlgItemTextA',\
  73. MessageBox,'MessageBoxA',\
  74. EndDialog,'EndDialog',\
  75. wsprintf,'wsprintfA'
  76.  
  77. section '.rsrc' resource data readable
  78.  
  79. directory RT_DIALOG,dialogs
  80.  
  81. resource dialogs,ID_DIALOG,LANG_ENGLISH+SUBLANG_DEFAULT,fdeldialog
  82.  
  83. dialog fdeldialog,'FDelete',0,0,190,65,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME+DS_CENTER
  84. dialogitem 'STATIC','File Path:',-1,10,10,70,8,WS_VISIBLE
  85. dialogitem 'EDIT','',ID_EDIT,10,20,170,13,WS_VISIBLE+WS_BORDER+WS_TABSTOP
  86. dialogitem 'BUTTON','OK',IDOK,130,40,45,15,WS_VISIBLE+WS_TABSTOP+BS_DEFPUSHBUTTON
  87. enddialog
BTW, the odd indentation is caused by the forum.
Cache is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Prompt SkyPioneer Coder's Corner Lounge 5 May 3rd, 2006 10:07 PM
Search for and close open windows badbasser98 C++ 13 Feb 27th, 2006 12:04 PM
Windows Vista, well sort of coldDeath Coder's Corner Lounge 21 Sep 6th, 2005 1:00 PM
Should I learn assembler? teencoder Assembly 9 Aug 7th, 2005 9:39 AM
Net Group /ADD (on a windows box, non domain controller) Infinite Recursion Other Programming Languages 1 Apr 13th, 2005 2:27 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:44 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC