[Coco] Javascript 6809 emulator

Harry Hurst hhos at st-tel.net
Sun Mar 9 16:41:42 EDT 2014


>> This may be something already known here, but I just saw a link posted
>> on Hacker News.
>>
>> https://github.com/maly/6809js
>>
>> James
>
> I've been looking over something very similar here:
>
> https://github.com/naughton/mc6809/blob/master/mc6809.ts
>
> It's written in "TypeScript", and is part of a Defender emulator project.
> I'm not certain what the advantage of this TypeScript is because, as I
> understand it, it gets converted to JavaScript before you actually run it.
> It might be like the difference between C and C++? Anyway, if you see any
> blatant errors, or not so blatant, let me know. I have write permissions
> to this project, so if I understand any problems you see in it, I will
> make the necessary changes. I am still trying to figure it out myself. So
> far, I have found only one error in the ROL instruction, caused by a typo,
> and I'm almost certain I have corrected that.
>
> HH
>

I just remembered something I wanted to ask about. In this TypeScript 6809
emulator the author sets the S register to $BFFF on a reset, as well as on
a cold start. I haven't tried to look it up yet, so I don't know, but I
thought it would go to all zeros. It doesn't seem to be a big deal since
the stack isn't used until it has been specifically be set to $9F00, but I
thought I ask a quick question in here. What are the initial values placed
in the registers of the 6809 at start up? I'm thinking all zeros. Does
anybody think, or know, otherwise?

HH




More information about the Coco mailing list