Mordekai Posted May 16, 2009 Share Posted May 16, 2009 Is anyone using notepad++ to xasm? I can't get the code from notepad++ into xasm. Any suggestions on setting this up? Thanks. M. Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 16, 2009 Share Posted May 16, 2009 Typically, you need a script or Batch file. I use EditPlus with ATAsm. When I want to Assemble, I save the file then use the Tools pulldown to call the Assembler. The actual invokation of ATAsm is done by calling it from a Batch file, which EditPlus passes parameters to. Typically, it should be a similar task with other Editors. Quote Link to comment Share on other sites More sharing options...
pps Posted May 17, 2009 Share Posted May 17, 2009 Since Heaven is using notepad++ together with mads, maybe he can help wit a batch file. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted May 17, 2009 Share Posted May 17, 2009 yeah. I am using notepad++ but I am saving source in editor, switching with alt+tab to command line and then enter cursor up to last assembler call... works good without configuring notepad++ to call the batch file itself... I am in Mac environment right now so I can not start notepad++ but will have a look... but a general batch file could be (for command line) asm.bat: mads %1.asm or for xasm: xasm %1.asm %1.obx xboot %1.obx %1.atr Quote Link to comment Share on other sites More sharing options...
pps Posted May 17, 2009 Share Posted May 17, 2009 The mac runs win programmes perfectly from virtual environment... why not use it for having both worlds on one machine? Quote Link to comment Share on other sites More sharing options...
JamesD Posted May 17, 2009 Share Posted May 17, 2009 yeah. I am using notepad++ but I am saving source in editor, switching with alt+tab to command line and then enter cursor up to last assembler call... works good without configuring notepad++ to call the batch file itself... That's exactly what I'm doing. Quote Link to comment Share on other sites More sharing options...
Mordekai Posted May 23, 2009 Author Share Posted May 23, 2009 Well I'm still having some problems. I created a batch file. When I run the batch file from the command line it creates a .bin file (which is empty), it also opens Atari800Win emulator (which gives me a ROM load error). I still can't figure out how to get the code to compile (or is it)? My assembly code is saved as .asm file located in my xasm folder. My batch file code: @echo off start xasm %1.asm > %1.bin start %1.bin Am I going about this the wrong way?. I just want to learn to code/assemble/test. Any suggestions? Thanks. M. Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 24, 2009 Share Posted May 24, 2009 I'd guess it's probably a case of the pathname not being right when you call your batch file. With EditPlus, I just use whatever path name the Source code is in - so you end up with the assembled file in the same directory. Quote Link to comment Share on other sites More sharing options...
MaPa Posted May 27, 2009 Share Posted May 27, 2009 (edited) Well I'm still having some problems. I created a batch file. When I run the batch file from the command line it creates a .bin file (which is empty), it also opens Atari800Win emulator (which gives me a ROM load error). I still can't figure out how to get the code to compile (or is it)? My assembly code is saved as .asm file located in my xasm folder. My batch file code: @echo off start xasm %1.asm > %1.bin start %1.bin Am I going about this the wrong way?. I just want to learn to code/assemble/test. Any suggestions? Thanks. M. Just run xasm.exe without parameters and see what syntax and options it has. Your batch file just assembles %1.asm and creates %1.obx which is atari executable that you want and plus you redirect console output of xasm messages to file %1.bin. So if you open %1.bin in text editor there will be something like: xasm 3.0.1 Writing object file... 476 lines of source assembled 1443 bytes written to the object file You should modify your batch file to something like this: (maybe don't use the .bin extension, don't know how emulator will handle it when it's not ROM image but atari executable) @echo off start xasm %1.asm /o:%1.bin start %1.bin I use this batch file to test my code (one keypress in ConTEXT editor to run it in emu if compiled successfully). The /u switch just displays unused labels. I check errorlevel code of xasm to not run emulator if the assembling didn't completed without error (there is no file to run or the last compiled version, not the one you wanted). @echo off "D:\Atari\Xasm 3.0.1\xasm.exe" %1.xsm /o:%1.xex /u if errorlevel=2 goto end %1.xex :end Edited May 27, 2009 by MaPa Quote Link to comment Share on other sites More sharing options...
Mordekai Posted May 27, 2009 Author Share Posted May 27, 2009 Just run xasm.exe without parameters and see what syntax and options it has. Your batch file just assembles %1.asm and creates %1.obx which is atari executable that you want and plus you redirect console output of xasm messages to file %1.bin. So if you open %1.bin in text editor there will be something like:xasm 3.0.1 Writing object file... 476 lines of source assembled 1443 bytes written to the object file The .bin file that is created is empty. You should modify your batch file to something like this: (maybe don't use the .bin extension, don't know how emulator will handle it when it's not ROM image but atari executable)[code]@echo off start xasm %1.asm /o:%1.bin start %1.bin I tried this but windows can't find the .bin file. It appears that a .bin is not being created. I use this batch file to test my code (one keypress in ConTEXT editor to run it in emu if compiled successfully). The /u switch just displays unused labels. I check errorlevel code of xasm to not run emulator if the assembling didn't completed without error (there is no file to run or the last compiled version, not the one you wanted). [code]@echo off "D:\Atari\Xasm 3.0.1\xasm.exe" %1.xsm /o:%1.xex /u if errorlevel=2 goto end %1.xex :end I downloaded ConTEXT. I can't get this to work either. This is the error I get: .xsm <0> ERROR: Cannot open or create file '.xsm' xasm 3.0.1 Here's the code for my batch file that I'm using with ConTEXT: "C:\xasm\xasm.exe" %1.xsm /o:%1.xex /u if errorlevel=2 goto end %1.xex :end I'm still stuck. Any suggestions? Thanks.M. Quote Link to comment Share on other sites More sharing options...
MaPa Posted May 28, 2009 Share Posted May 28, 2009 (edited) You should modify your batch file to something like this: (maybe don't use the .bin extension, don't know how emulator will handle it when it's not ROM image but atari executable) @echo off start xasm %1.asm /o:%1.bin start %1.bin I tried this but windows can't find the .bin file. It appears that a .bin is not being created. Does xasm even assemble something? In your batch file you are calling xasm without path, are you switched to it's directory? If so, are you passing parametr %1 to batch file with whole path to your source code not just filename? I use this batch file to test my code (one keypress in ConTEXT editor to run it in emu if compiled successfully). The /u switch just displays unused labels. I check errorlevel code of xasm to not run emulator if the assembling didn't completed without error (there is no file to run or the last compiled version, not the one you wanted). [code]@echo off "D:\Atari\Xasm 3.0.1\xasm.exe" %1.xsm /o:%1.xex /u if errorlevel=2 goto end %1.xex :end I downloaded ConTEXT. I can't get this to work either. This is the error I get: .xsm <0> ERROR: Cannot open or create file '.xsm' xasm 3.0.1 Here's the code for my batch file that I'm using with ConTEXT: "C:\xasm\xasm.exe" %1.xsm /o:%1.xex /u if errorlevel=2 goto end %1.xex :end I'm still stuck. Any suggestions? Thanks. M. The .xsm extension is just my extension of source files. You are using .asm as you wrote. I pass just filename without extension as parameter to my batch file. Working directory is the one where source code is located therefore I have to specify full path to xasm.exe to start it and don't have to specify path to source file and the output is generated in the same directory as source. Edited May 28, 2009 by MaPa Quote Link to comment Share on other sites More sharing options...
tebe Posted November 28, 2010 Share Posted November 28, 2010 Notepads++ 5.8.5 http://notepad-plus-plus.org/ in attachment PDF - configure NppExec plugin (console output) Notepad++.zip userDefineLang_mads.zip Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 28, 2010 Share Posted November 28, 2010 Thanks: I'm interested to see what this is like. Quote Link to comment Share on other sites More sharing options...
tebe Posted November 28, 2010 Share Posted November 28, 2010 Plugins > NppExec > Console Output Filters... > HighLight %ABSFILE% (%LINE%) WARNING:* %ABSFILE% (%LINE%) ERROR:* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.