02 July 2009, 10:51 | #1 |
Registered User
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
|
TextMate bundle for M68K Assembly
I've been working on a simple TextMate bundle for 68000 assembly language, for anyone who, like me, is crazy enough to want to write amiga assembler programs on a Mac
I believe this windows editor is supposed to be able to use these bundles too. It's my first bundle, and the regexp sytax is a bit different to what I'm used to, so I've almost certainly done a few things wrong. Still, it seems to work fairly well on the source files I've been testing it with. Global (but not local) labels, macros, and section names are inserted into the symbol list for easy jumping around. Standard 68000 opcodes and registers get syntax highlighting, as well as numeric constants and quoted strings. I've also included a very simple snippet for creating a macro. Installation should be as simple as unzipping the bundle and double-clicking. If that doesn't work copy the unzipped bundle into your "Library/Application Support/TextMate/Bundles" folder. Anyway, if anyone is interested I'd be grateful for any feedback/bug reports/suggestions. Hope somebody finds it useful. EDIT - New version available.. see below. Last edited by xaind; 17 July 2009 at 10:40. Reason: New version available |
02 July 2009, 10:59 | #2 |
Registered User
Join Date: Jun 2008
Location: Sydney / Australia
Posts: 83
|
Awesome!
|
03 July 2009, 16:23 | #3 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
I've been after something like this for ages. You utter star. Many thanks!
|
09 July 2009, 11:44 | #4 |
Registered User
Join Date: Oct 2007
Location: France, 87
Age: 44
Posts: 96
|
Great ! Thanks a lot xaind !
|
13 July 2009, 13:55 | #5 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
I love the colour scheme. Shame something on the Amiga doesn't have this
|
13 July 2009, 23:34 | #6 |
Spellcoder
Join Date: Aug 2006
Location: The Netherlands
Age: 44
Posts: 27
|
@xaind: Nice I did notice however some parts of sources which were incorrectly highlighted. For example I noticed this line causing code after it to be highlighted as comment:
MOVEQ #'\',D1 @bippym: do you mean it's a shame Amiga code/texteditors don't have it? (since AsmPro has syntax highlighting) |
13 July 2009, 23:56 | #7 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
No I like the colour scheme/font etc.. Looks cool
|
14 July 2009, 03:58 | #8 |
Registered User
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
|
@Spellcoder: Yeah, that's an annoying problem. I wrote the syntax highlighting to work with PhxAss code, which would consider your line a syntax error because the backslash is used as an escape symbol. For PhxAss you would write your line this way instead:
Code:
MOVEQ #'\\',D1 The documentation I have for Asm-One/Pro is pretty sparse. Does anyone know if it supports any escape sequences inside quoted strings? @bippym: The font I'm using in the screenshot is Bitstream Vera Sans Mono.. available from http://www.gnome.org/fonts/. The colour scheme is one of the standard ones that comes with TextMate. |
14 July 2009, 09:50 | #9 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
|
17 July 2009, 10:43 | #10 |
Registered User
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
|
Ok, here's a new version that ignores escape sequences inside quoted strings.
There's also a couple of other tweaks (macros with dots in their names, etc.) Last edited by xaind; 14 May 2012 at 06:56. |
17 July 2009, 11:25 | #11 |
Registered User
Join Date: Jan 2008
Location: SouthEast-ish UK
Posts: 372
|
Such a great text editor. If only I know 68k!
|
05 September 2009, 20:05 | #12 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
Wich assember do you use on MAC?
Hi,
First thanks for the bundle, what assembler do you use on MAC? Do you use a native one then start UAE or transfer to a real Amiga, or do you save your file and assemble it under UAE? kml |
05 September 2009, 20:35 | #13 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
I can recommend vasm and vlink for use on the Mac, and any system really as it's plain C and fully portable. It also supports Devpac code style, though I would recommend different structure and formatting for easier development.
I have a made a simple but adequate bash tool set for use within the OS X terminal. A script creates a project template which consists of a catalog with a build script and a basic source file. I edit my code and then run the build script which in turn runs the tools and builds the final executable, I then switch to WinUAE (run through Parallels or VirtualBox) and start the program directly from CLI or Workbench. It's just three key presses from source code to running your program, and the build phase is instant on any modern GHz computer. |
05 September 2009, 21:04 | #14 | |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
Nash tool
Hi
CAN you Share your script? Why don't you use a native version of UAE? I suppose That the OSX port is less accurate. How fast is it under émulation? Thanks Quote:
|
|
06 September 2009, 01:11 | #15 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
I'm using WinUAE under virtualization because the latest UAE available for OS X is several years old. On my Macbook with a 2.6GHz Core 2 Duo I get full speed for the stock A500 and A1200 emulations I use for testing.
Here's my setup as I'm using it. Unzip into your home catalog and make sure the amiga/tools/ catalog is in your path so the tools can be found. On OS X you can make sure this is done every time you open a terminal by editing the file .profile in your home catalog and adding this line: Code:
export PATH=$PATH:~/amiga/tools/ The code catalog contains projects and a library of tools and some include files. The library is very sparse but works for what I do. The tools catalog contains vasm, vlink, fixsource and gensintab built for OS X 10.6 64-bit, but source codes are available so you can rebuild these for any system. I can provide these for other systems if you can't build them yourself. Fixsource is a preprocessor which removes whitespace so you can format your code in a clear readable way without vasm complaining. Gensintab creates sinus tables. To use the setup in bash you step into the code catalog and run the template script like this: Code:
sh template test All scripts here are in bash style for Unix like systems and assume that the amiga catalog is placed in your home catalog, but the setup should be easy to convert for use in Windows. Last edited by Leffmann; 15 March 2012 at 19:02. |
06 September 2009, 20:05 | #16 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
Thanks for sharing, I'll test this setup.
Too bad that UAE on MAC is not updated anymore, I though that E-UAE aim was to bring UAE on others platforms on par with winuae |
08 September 2009, 00:17 | #17 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
How about compiling the Linux version and run it under Fink?
Might be not that bad? kml |
08 September 2009, 01:12 | #18 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
I just tried winuae under OS X SL (Macbook 2Gig Intel) in windowed mode using darwine it worked quite well. I should tried a native port to compare though. The sound was not high quality.
kml |
20 September 2009, 00:06 | #19 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
Leffman: many thanks for the scripts.
I use the same setup on the mac, but load and compile within AsmPro within WinUAE. Your vasm path sounds well worth a try. |
14 May 2012, 00:20 | #20 |
Posts: n/a
|
hi. i'm planning to put this in to github and make it opensource bundle for textmate... @xaind is it ok?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Zelda 3T , now playable on real m68k :) | meckert | News | 20 | 11 July 2019 12:35 |
Csound 3.481 on m68k | squidbass | Amiga scene | 5 | 21 July 2013 21:29 |
Assembler that generates all M68k opcodes | TheDarkCoder | Coders. Asm / Hardware | 12 | 07 February 2013 10:37 |
Rewriting m68k code | RobSis | Coders. Tutorials | 1 | 26 January 2013 16:15 |
#M68k @ Amigaworld.net | Iznougoud | Amiga scene | 0 | 06 October 2007 16:35 |
|
|