08 November 2013, 21:06 | #1 |
Posts: n/a
|
Amiga Sourcecode File Format
Hello all,
I am having some trouble editing sourcecode Files that I then transfer to my A1200. I am editing my Assembly source using Vim under Windows and then transferring the File to my A1200 using Amiga Explorer. I have noticed that Vim running on the PC side is adding in 0x0D, 0x0A for Return presses but on the Amiga it is 0x0A for Carriage-Return and Line-Feed. Does anyone know how to set Vim to generate Return presses with only the 0x0A at all? I do not wish to have to write a small Utility that converts everything if I can at all help it. Cheers. |
08 November 2013, 21:29 | #2 |
Posts: n/a
|
Oddly enough when I create a File on the Amiga side first and then tx it to the PC side there are no further issues. Perhaps I can use dos2unix or the other way around to convert the File?
|
08 November 2013, 22:12 | #3 |
Registered User
Join Date: Mar 2013
Location: Slovenia
Posts: 138
|
Yes, you can use dos2unix util. Windows text files by default have both '\r' and '\n' line endings, while Amiga (and Unix-like OSes) usually have just '\n'.
Also, any good Windows text editor (like Notepad++) will allow you to convert line endings. Oh, missed that you are using vim, which is of course a great editor! Use :set ff=dos or :set ff=unix to set line ending chars (ff = fileformat). You can even use :w ff=unix Vim is great! |
08 November 2013, 22:15 | #4 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
Amiga ascii text files have Unix line endings. To convert check here:
http://vim.1045645.n5.nabble.com/Wor...td1151082.html This is about using Windows line endings, but has some info about using different line endings in general. If that doesn't help, just google for a solution, because this isn't Amiga specific. There is no need to use some utility for this. |
09 November 2013, 03:28 | #5 | |
Posts: n/a
|
Quote:
|
|
09 November 2013, 03:29 | #6 | |
Posts: n/a
|
Quote:
|
|
09 November 2013, 12:05 | #7 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
If you're using a good scriptable editor like Vim, you may want to consider using vasm or another cross-assembler, that way you can make things more convenient by building your programs directly inside Vim.
|
09 November 2013, 20:41 | #8 | |
Posts: n/a
|
Quote:
Generally, what do many of the Amiga Developers these Days use for cross-development? I am not interested in C for Amiga work so I am more interested in Cross-Assemblers. I tend not to build within Vim; I always prefer to have a separate Terminal Session opened up for building. |
|
10 November 2013, 02:25 | #9 |
Posts: n/a
|
I shall have to have a closer look at VASM. I am hoping that it'll build under FreeBSD or Cygwin
|
10 November 2013, 04:43 | #10 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,630
|
No need to write a tool to do this on your Amiga, as one has already been written; it is called Report+, and you can get it from http://amigan.1emu.net/releases/
|
10 November 2013, 14:05 | #11 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
http://eab.abime.net/showthread.php?...ual#post898786 There's no immediate need to write any link-scripts, vlink knows all the important Amiga formats, but you may want to use a make-script or something and bind that in the editor to automate the whole build with a single key-press, that's what I meant with building directly inside Vim. Here's the template I use f.ex: Code:
C = vc -c -c99 -O=1 A = vasm -spaces -nosym -I$$LIB -Fhunk -quiet L = vlink -s -sc -sd -bamigahunk LIBS = $$LIB/wbstartup.o $$LIB/setsystem.o $$LIB/amiga.lib default: prog prog: main.o @$(L) main.o -o prog $(LIBS) @cp prog $$FSUAE/p @cp prog $$SHARED/p main.o: main.s @$(A) main.s -o main.o clean: @rm -f *.o prog |
|
10 November 2013, 16:43 | #12 | |
Posts: n/a
|
Quote:
I just built it under Cygwin. When I switch my FreeBSD Machine on I will then try to built it for FreeBSD too. I wouldn't touch VC++ with a Bargepole. Yes, I shall create a Makefile for my Amiga Projects. I understand that you like to build from within Vim. Thanks for letting me know about VASM - I hope that it'll make my builds faster - cheers. |
|
10 November 2013, 17:15 | #13 |
Music lord
Join Date: Jun 2003
Location: Liverpool, UK
Age: 50
Posts: 630
|
:set fileformat=unix
for unix line-endings. :%s/\r//g to get rid of existing 0x0d characters. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
File format | absence | Coders. General | 8 | 18 July 2012 01:25 |
KryoFlux: STREAM file format documentation | mr.vince | project.SPS (was CAPS) | 1 | 26 May 2011 00:40 |
Graphics File Format information | Nogg | request.Other | 6 | 02 April 2010 01:46 |
C.A.P.S. Game Manuals -> What file format? | fiath | Retrogaming General Discussion | 36 | 18 November 2002 13:33 |
DW file format | Leto2 | request.Modules | 2 | 07 March 2001 18:40 |
|
|