Loading ...
Sorry, an error occurred while loading the content.

26066Re: [midatlanticretro] Re: ROM Bootloader Issues

Expand Messages
  • Kyle Owen
    Jun 2, 2012
      The code is 6800 (for my SWTPC 6800, in fact). I failed to include that in my original email, duh! Sorry about that.

      PSHA will push the contents of accumulator A onto the stack and will then decrease the SP by one. PULA will increase the SP by one and pull the byte at the SP into accumulator A. Yeah, I got confused somewhere in there.

      DEX in the 6800 will only affect the zero flag, no others. I'm quite sure of that. The other decrement operands (DEC, DECA, DECB) will affect the negative, zero and overflow flags, however. 

      My latest (working, even!) version is indeed using CPX. In fact, here's the code: http://pastebin.com/VQFsPFqH



      On Sat, Jun 2, 2012 at 7:06 PM, joshbensadon <no_reply@yahoogroups.com> wrote:

      Hi Kyle,

      I might be a little confused so excuse me if I'm in left field.

      Looking at your code, it looks like Z80 right?
      Doesn't the PUSH put 2 bytes on the stack? Accumulator and PSW??
      Further, the PUSH decrements the places the data.
      So, you should load the stack pointer with RAMEND+1 and after every push, you should INX SP.

      --- In midatlanticretro@yahoogroups.com, Kyle Owen <kylevowen@...> wrote:
      > Hi guys,
      > So I recently copied 8k BASIC to (4) 2kB EEPROMs in hopes that I could make
      > a bootloader to copy the contents into RAM, eliminating the 5 minutes or so
      > that it would otherwise take to load BASIC via RS-232.
      > Anyways, I'm completely stumped as to why my very simple bootloader isn't
      > working correctly. The code can be found here: http://pastebin.com/jbrTHdnX
      > It actually does copy the contents correctly, but fails to exit to the
      > monitor on time. The DEX instruction can only update the zero flag, so I am
      > fairly limited on branches. It should exit the loop as soon as the index
      > register is zero, but instead, it exits well after the index register
      > underflows.
      > Any help would be much appreciated, as always. Thanks!
      > Kyle

    • Show all 9 messages in this topic