English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 02 July 2009, 11:51   #1
xaind
Registered User
 
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 99
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.
Attached Thumbnails
Click image for larger version

Name:	Picture.png
Views:	832
Size:	28.6 KB
ID:	21940  

Last edited by xaind; 17 July 2009 at 11:40. Reason: New version available
xaind is offline  
Old 02 July 2009, 11:59   #2
Redwood
Registered User
 
Join Date: Jun 2008
Location: Sydney / Australia
Posts: 83
Awesome!
Redwood is offline  
Old 03 July 2009, 17:23   #3
korruptor
TDI
korruptor's Avatar
 
Join Date: Feb 2007
Location: DUNDEE
Posts: 122
I've been after something like this for ages. You utter star. Many thanks!
korruptor is offline  
Old 09 July 2009, 12:44   #4
frost242
Registered User
 
Join Date: Oct 2007
Location: France, 87
Age: 40
Posts: 96
Great ! Thanks a lot xaind !
frost242 is offline  
Old 13 July 2009, 14:55   #5
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 44
Posts: 8,892
I love the colour scheme. Shame something on the Amiga doesn't have this
BippyM is offline  
Old 14 July 2009, 00:34   #6
Spellcoder
Spellcoder
Spellcoder's Avatar
 
Join Date: Aug 2006
Location: The Netherlands
Age: 39
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)
Spellcoder is offline  
Old 14 July 2009, 00:56   #7
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 44
Posts: 8,892
No I like the colour scheme/font etc.. Looks cool
BippyM is offline  
Old 14 July 2009, 04:58   #8
xaind
Registered User
 
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 99
@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
Of course, Asm-One or AsmPro would consider that to be an error. I guess Asm-One and AsmPro are the more popular assemblers though, so I should probably change it to their syntax.

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.
xaind is offline  
Old 14 July 2009, 10:50   #9
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,284
Quote:
Originally Posted by xaind View Post
The documentation I have for Asm-One/Pro is pretty sparse. Does anyone know if it supports any escape sequences inside quoted strings?
It doesn't.
StingRay is offline  
Old 17 July 2009, 11:43   #10
xaind
Registered User
 
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 99
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 07:56.
xaind is offline  
Old 17 July 2009, 12:25   #11
wilshy
Registered User
 
Join Date: Jan 2008
Location: SouthEast-ish UK
Posts: 372
Such a great text editor. If only I know 68k!
wilshy is offline  
Old 05 September 2009, 21:05   #12
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,029
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


Quote:
Originally Posted by xaind View Post
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.)
kamelito is offline  
Old 05 September 2009, 21:35   #13
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
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.
Leffmann is offline  
Old 05 September 2009, 22:04   #14
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,029
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:
Originally Posted by Leffmann View Post
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.
kamelito is offline  
Old 06 September 2009, 02:11   #15
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
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 sharedhd catalog is used as a directory based harddrive in UAE so I can move files to the emulated Amiga easily.

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
and it will create a catalog named test, inside there will be a source file named test.s and a build script named build. You step into the catalog and run the script with "sh build" and it will produce the final executable and place it in the sharedhd catalog. If you need additional files or build steps you can just edit this into the build script.

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 20:02.
Leffmann is offline  
Old 06 September 2009, 21:05   #16
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,029
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
kamelito is offline  
Old 08 September 2009, 01:17   #17
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,029
How about compiling the Linux version and run it under Fink?
Might be not that bad?
kml
kamelito is offline  
Old 08 September 2009, 02:12   #18
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,029
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
kamelito is offline  
Old 20 September 2009, 01:06   #19
korruptor
TDI
korruptor's Avatar
 
Join Date: Feb 2007
Location: DUNDEE
Posts: 122
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.
korruptor is offline  
Old 14 May 2012, 01:20   #20
vigo
 
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 13:35
Csound 3.481 on m68k squidbass Amiga scene 5 21 July 2013 22:29
Assembler that generates all M68k opcodes TheDarkCoder Coders. Asm / Hardware 12 07 February 2013 11:37
Rewriting m68k code RobSis Coders. Tutorials 1 26 January 2013 17:15
#M68k @ Amigaworld.net Iznougoud Amiga scene 0 06 October 2007 17:35

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 03:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.09168 seconds with 16 queries