Yes, that all makes sense, or rather it doesn't make any sense at all, but I do now remember that it happens. DOS, eh?
Nice to get a bit of a kick up the arse occasionally to remind me that nothing is straightforward!
Loading binaries created by asm6809.pl
Re: Loading binaries created by asm6809.pl
Dont' beat yourself up about it! It's still a great piece of code, and you'd be forgiven for presuming that only a mad person would run Perl under DOS. Apologies for being that mad person and exposing the problem. Still, I'm happy because I now program the beast again!
Re: Loading binaries created by asm6809.pl
http://alma.ch/perl/perloses.htmtjewell wrote:So the fix is simple - Sixxie, I've added a "binmode $output_file;" at line 557 in the assembler script. I guess better minds than mine could work out how to do a 'if DOS then' kinda wrapper round it.
http://stackoverflow.com/questions/3346 ... em-in-perl
Last edited by zephyr on Mon Sep 13, 2010 1:48 am, edited 3 times in total.
Re: Loading binaries created by asm6809.pl
Perl is an unknown language for me at present; but from the information above I would think the following code placed at line 558 (Perl script v1.1) would do the job.
Is this correct?
Code: Select all
if (($^O eq 'MSWin32') || ($^O eq 'dos')) {
binmode $output_file;
}
Re: Loading binaries created by asm6809.pl
That's the sort of thing, but it's not necessary: in this case, we want binary mode whatever the architecture. On non-DOS, it'll just be a no-op.
Re: Loading binaries created by asm6809.pl
Are you going to add 'binmode $output_file;' to your v1.1 (change version to 1.2) Perl script?
Re: Loading binaries created by asm6809.pl
Looks like I already had something called 1.2 in git, so this is 1.3, and uploaded!