[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turbo Pascal for the Apple II (native, not CP/M)
On Mar 8, 9:07 am, AppleCPM <a...@wilserv.com> wrote:
> Hi!
>
> On Mar 8, 8:09 am, Steven wrote:
>
> > I'm still not quite following this. I'm aware of the Z80 disassembly. Are
> > you saying that you're hand-translating the Z80 asm to 6502?
>
> "SCG.EXE", part of the "SCG.ZIP" archive referred to in a previous
> message, creates an 8086 assembly language source file from the
> executable for version 3.01A of Turbo Pascal for MS/DOS. I took the
> generated source file and added a bunch of macros. The macros allow
> 8086 assembly language mnemonics to assemble as 6502 machine
> language. For example, ' MOV.B BH,mem' becomes ' LDA mem' and ' STA
> BH'. Similarly, ' MOV BX,mem' becomes ' LDA mem', ' STA BX', LDA mem
> +1' and ' STA BX+1'. If this doesn't explain what's going on I
> suggest that you have me send you a copy of the latest listing file.
> As they say, a picture is worth a 1000 words. Of course, the picture
> will be blurry if you don't know 6502 assembly language.
>
> Willi
It seems to me that doing this will create a version of Turbo Pascal
that runs on the 6502, but generates Z80 assembly output.
Isn't that the easy part compared to creating a compiler that outputs
code for the 6502, or do I misunderstand your goal?