Skip to content

scas misassembles castle #409

Open
Open

Description

@pixelherodev

scas currently misassembles castle, in a seriously bad way. This is likely an issue with either macros, conditional assembly, or relative jumps.

Activity

  1. added this to the scas 1.0 milestone on Oct 14, 2020
  2. aviallon commented on Oct 14, 2020

    @aviallon
    Member

    Do you think that the corrupted kalculator I have may be caused by that?
    Perhaps assembling compiler output my be a good "completeness" test as the compiler produces unoptimized things.

  3. pixelherodev commented on May 2, 2021

    @pixelherodev
    Author

    @aviallon It's entirely possible.

    You can try using sass, but I'm not sure if that works with kcc output.

  4. modified the milestones: scas 1.0, scas 0.6 on May 2, 2021
  5. aviallon commented on May 11, 2021

    @aviallon
    Member

    I also think that I'll simply end up writing my calculator in assembly. This way I'm sure it'll work.
    Also, I think C is badly suited for the z80e, so another language might be better for that (one that natively supports 16 bit data type and which has less undefined behavior)

  6. pixelherodev commented on May 11, 2021

    @pixelherodev
    Author

    @aviallon Of all the pieces of KnightOS that need work, z80e is not - to my knowledge - one of them. It definitely doesn't need to be rewritten in any other language, and I guarantee you that doing so will create more bugs than it fixes. Also, C has very good 16-bit (and 8-bit) support with stdint.h, which I highly recommend using for all integers in C. Using "raw" types (int / short / long / etc) is almost always a mistake for portable code.

    z80e isn't perfect, but it's very good. What we really need is a way to automatically test it against a real calculator, but that's a lot harder. Testing the CPU is trivial - the CPU emulation is perfect[ly correct], but it's a z80 so that's not particularly challenging - but testing the rest of the ASIC is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions