Comments (3)
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.
Reopened as this does not seem to work consistently.
from xa80.
Now fixed, required major rewrite of the pre-parser
from xa80.
Related Issues (20)
- Remove WORD directive
- Remove indirection for 8080/8085
- Add IFDEF / IFNDEF
- Add SET as synonym for =
- IFDEF not acting correctly on --define command line
- Alternative filetypes for command line parameters
- Indirection feature - make automatic
- 24 bit code HOT 1
- Make SET directive available if the opcode table doesn't use it
- Create file of undocumented opcodes
- Add versioning to the .opcode.bin files
- Add a PROCESSOR() function
- Allow keywords to be used as labels HOT 2
- Write manual for opcode compiler HOT 1
- Opcode compiler show version number
- Check for non-existent parameter expansions
- Using # for command prefix HOT 1
- Show error for mismatch in no. of macro parameters
- Investigate macro parameters containing commas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xa80.