Git Product home page Git Product logo

Comments (3)

duncanamps avatar duncanamps commented on June 15, 2024

Now working as it should:

                           24 | myname          MACRO   inst
                           25 | myfunc{inst}:   PUSH    BC          // Copy BC register
                           26 |                 POP     AF          // into AF
                           27 |                 {inst}              // Perform shift / rotate
                           28 |                 PUSH    AF          // Save flags straight away
                           29 |                 CP      A,D         // Check if A the same
                           30 |                 JP      NZ, FAIL    // No, mismatch, flag an error
                           31 |                 POP     BC          // Get flags back into C
                           32 |                 LD      A,$13       // Mask for Half carry, subtract, and carry flags
                           33 |                 AND     A,C         // Leave just the ones we want
                           34 |                 CP      A,E         // Expected?
                           35 |                 JP      NZ, FAIL    // No, flag as an error
                           36 |                 RET                 // Return; all was good
                           37 |                 ENDM
                           38 | 
                           39 |         ORG     $0200
                           40 |         
                           41 | codestart
                           42 |                 myname  RLA
0200: C5                   42 | myfuncRLA:      PUSH    BC          // Copy BC register
0201: F1                   42 |                 POP     AF          // into AF
0202: 17                   42 |                 RLA                 // Perform shift / rotate
0203: F5                   42 |                 PUSH    AF          // Save flags straight away
0204: BA                   42 |                 CP      A,D         // Check if A the same
0205: C2 00 00             42 |                 JP      NZ, FAIL    // No, mismatch, flag an error
0208: C1                   42 |                 POP     BC          // Get flags back into C
0209: 3E 13                42 |                 LD      A,$13       // Mask for Half carry, subtract, and carry flags
020B: A1                   42 |                 AND     A,C         // Leave just the ones we want
020C: BB                   42 |                 CP      A,E         // Expected?
020D: C2 00 00             42 |                 JP      NZ, FAIL    // No, flag as an error
0210: C9                   42 |                 RET                 // Return; all was good

from xa80.

duncanamps avatar duncanamps commented on June 15, 2024

Reopened as this does not seem to work consistently.

from xa80.

duncanamps avatar duncanamps commented on June 15, 2024

Now fixed, required major rewrite of the pre-parser

from xa80.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.