@andrivet/z80-assembler 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +13 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +35 -0
- package/.github/workflows/node.js.yml +47 -0
- package/.prettierignore +3 -0
- package/.prettierrc +3 -0
- package/.vscode/extensions.json +7 -0
- package/README.md +53 -27
- package/apps/.gitkeep +0 -0
- package/apps/z80-assembler-app/.eslintrc.json +18 -0
- package/apps/z80-assembler-app/index.html +16 -0
- package/apps/z80-assembler-app/postcss.config.js +24 -0
- package/apps/z80-assembler-app/project.json +70 -0
- package/apps/z80-assembler-app/public/favicon.ico +0 -0
- package/apps/z80-assembler-app/public/logo.png +0 -0
- package/apps/z80-assembler-app/public/logo192.png +0 -0
- package/apps/z80-assembler-app/public/logo512.png +0 -0
- package/apps/z80-assembler-app/public/manifest.json +25 -0
- package/apps/z80-assembler-app/public/robots.txt +3 -0
- package/apps/z80-assembler-app/src/app/app.module.css +0 -0
- package/apps/z80-assembler-app/src/app/app.tsx +122 -0
- package/apps/z80-assembler-app/src/app/binary.tsx +39 -0
- package/apps/z80-assembler-app/src/app/editor.tsx +228 -0
- package/apps/z80-assembler-app/src/app/errors.tsx +31 -0
- package/apps/z80-assembler-app/src/app/footer.tsx +20 -0
- package/apps/z80-assembler-app/src/app/header.tsx +57 -0
- package/apps/z80-assembler-app/src/app/misc.ts +13 -0
- package/apps/z80-assembler-app/src/app/opcodes.tsx +335 -0
- package/apps/z80-assembler-app/src/assets/.gitkeep +0 -0
- package/apps/z80-assembler-app/src/assets/images/logo192.png +0 -0
- package/apps/z80-assembler-app/src/main.tsx +22 -0
- package/apps/z80-assembler-app/src/styles.css +8 -0
- package/apps/z80-assembler-app/tailwind.config.js +28 -0
- package/apps/z80-assembler-app/tsconfig.app.json +22 -0
- package/apps/z80-assembler-app/tsconfig.json +21 -0
- package/apps/z80-assembler-app/tsconfig.spec.json +23 -0
- package/apps/z80-assembler-app/vite.config.ts +64 -0
- package/assets/images/compile.png +0 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/menu.png +0 -0
- package/assets/images/opcodes-load8.png +0 -0
- package/assets/images/opcodes.png +0 -0
- package/assets/images/open-dir.png +0 -0
- package/assets/images/z80-assembler-app.png +0 -0
- package/docs/assembly.md +551 -0
- package/docs/images/ZX81-0x00.png +0 -0
- package/docs/images/ZX81-0x0B.png +0 -0
- package/docs/images/ZX81-0x0C.png +0 -0
- package/docs/images/ZX81-0x0D.png +0 -0
- package/docs/images/ZX81-0x0E.png +0 -0
- package/docs/images/ZX81-0x0F.png +0 -0
- package/docs/images/ZX81-0x10.png +0 -0
- package/docs/images/ZX81-0x11.png +0 -0
- package/docs/images/ZX81-0x12.png +0 -0
- package/docs/images/ZX81-0x13.png +0 -0
- package/docs/images/ZX81-0x14.png +0 -0
- package/docs/images/ZX81-0x15.png +0 -0
- package/docs/images/ZX81-0x16.png +0 -0
- package/docs/images/ZX81-0x17.png +0 -0
- package/docs/images/ZX81-0x18.png +0 -0
- package/docs/images/ZX81-0x19.png +0 -0
- package/docs/images/ZX81-0x1A.png +0 -0
- package/docs/images/ZX81-0x1B.png +0 -0
- package/docs/images/ZX81-0x1C.png +0 -0
- package/docs/images/ZX81-0x1D.png +0 -0
- package/docs/images/ZX81-0x1E.png +0 -0
- package/docs/images/ZX81-0x1F.png +0 -0
- package/docs/images/ZX81-0x20.png +0 -0
- package/docs/images/ZX81-0x21.png +0 -0
- package/docs/images/ZX81-0x22.png +0 -0
- package/docs/images/ZX81-0x23.png +0 -0
- package/docs/images/ZX81-0x24.png +0 -0
- package/docs/images/ZX81-0x25.png +0 -0
- package/docs/images/ZX81-0x26.png +0 -0
- package/docs/images/ZX81-0x27.png +0 -0
- package/docs/images/ZX81-0x28.png +0 -0
- package/docs/images/ZX81-0x29.png +0 -0
- package/docs/images/ZX81-0x2A.png +0 -0
- package/docs/images/ZX81-0x2B.png +0 -0
- package/docs/images/ZX81-0x2C.png +0 -0
- package/docs/images/ZX81-0x2D.png +0 -0
- package/docs/images/ZX81-0x2E.png +0 -0
- package/docs/images/ZX81-0x2F.png +0 -0
- package/docs/images/ZX81-0x30.png +0 -0
- package/docs/images/ZX81-0x31.png +0 -0
- package/docs/images/ZX81-0x32.png +0 -0
- package/docs/images/ZX81-0x33.png +0 -0
- package/docs/images/ZX81-0x34.png +0 -0
- package/docs/images/ZX81-0x35.png +0 -0
- package/docs/images/ZX81-0x36.png +0 -0
- package/docs/images/ZX81-0x37.png +0 -0
- package/docs/images/ZX81-0x38.png +0 -0
- package/docs/images/ZX81-0x39.png +0 -0
- package/docs/images/ZX81-0x3A.png +0 -0
- package/docs/images/ZX81-0x3B.png +0 -0
- package/docs/images/ZX81-0x3C.png +0 -0
- package/docs/images/ZX81-0x3D.png +0 -0
- package/docs/images/ZX81-0x3E.png +0 -0
- package/docs/images/ZX81-0x3F.png +0 -0
- package/docs/images/ZX81-0x80.png +0 -0
- package/docs/images/ZX81-0x8B.png +0 -0
- package/docs/images/ZX81-0x8C.png +0 -0
- package/docs/images/ZX81-0x8D.png +0 -0
- package/docs/images/ZX81-0x8E.png +0 -0
- package/docs/images/ZX81-0x8F.png +0 -0
- package/docs/images/ZX81-0x90.png +0 -0
- package/docs/images/ZX81-0x91.png +0 -0
- package/docs/images/ZX81-0x92.png +0 -0
- package/docs/images/ZX81-0x93.png +0 -0
- package/docs/images/ZX81-0x94.png +0 -0
- package/docs/images/ZX81-0x95.png +0 -0
- package/docs/images/ZX81-0x96.png +0 -0
- package/docs/images/ZX81-0x97.png +0 -0
- package/docs/images/ZX81-0x98.png +0 -0
- package/docs/images/ZX81-0x99.png +0 -0
- package/docs/images/ZX81-0x9A.png +0 -0
- package/docs/images/ZX81-0x9B.png +0 -0
- package/docs/images/ZX81-0x9C.png +0 -0
- package/docs/images/ZX81-0x9D.png +0 -0
- package/docs/images/ZX81-0x9E.png +0 -0
- package/docs/images/ZX81-0x9F.png +0 -0
- package/docs/images/ZX81-0xA0.png +0 -0
- package/docs/images/ZX81-0xA1.png +0 -0
- package/docs/images/ZX81-0xA2.png +0 -0
- package/docs/images/ZX81-0xA3.png +0 -0
- package/docs/images/ZX81-0xA4.png +0 -0
- package/docs/images/ZX81-0xA5.png +0 -0
- package/docs/images/ZX81-0xA6.png +0 -0
- package/docs/images/ZX81-0xA7.png +0 -0
- package/docs/images/ZX81-0xA8.png +0 -0
- package/docs/images/ZX81-0xA9.png +0 -0
- package/docs/images/ZX81-0xAA.png +0 -0
- package/docs/images/ZX81-0xAB.png +0 -0
- package/docs/images/ZX81-0xAC.png +0 -0
- package/docs/images/ZX81-0xAD.png +0 -0
- package/docs/images/ZX81-0xAE.png +0 -0
- package/docs/images/ZX81-0xAF.png +0 -0
- package/docs/images/ZX81-0xB0.png +0 -0
- package/docs/images/ZX81-0xB1.png +0 -0
- package/docs/images/ZX81-0xB2.png +0 -0
- package/docs/images/ZX81-0xB3.png +0 -0
- package/docs/images/ZX81-0xB4.png +0 -0
- package/docs/images/ZX81-0xB5.png +0 -0
- package/docs/images/ZX81-0xB6.png +0 -0
- package/docs/images/ZX81-0xB7.png +0 -0
- package/docs/images/ZX81-0xB8.png +0 -0
- package/docs/images/ZX81-0xB9.png +0 -0
- package/docs/images/ZX81-0xBA.png +0 -0
- package/docs/images/ZX81-0xBB.png +0 -0
- package/docs/images/ZX81-0xBC.png +0 -0
- package/docs/images/ZX81-0xBD.png +0 -0
- package/docs/images/ZX81-0xBE.png +0 -0
- package/docs/images/ZX81-0xBF.png +0 -0
- package/libs/.gitkeep +0 -0
- package/libs/z80-assembler/.eslintrc.json +18 -0
- package/libs/z80-assembler/package.json +20 -0
- package/libs/z80-assembler/project.json +35 -0
- package/libs/z80-assembler/public/README.md +54 -0
- package/{index.d.ts → libs/z80-assembler/src/index.ts} +1 -1
- package/libs/z80-assembler/src/lib/assets/code/basic-end.zx81 +4 -0
- package/libs/z80-assembler/src/lib/assets/code/basic-line1.zx81 +4 -0
- package/libs/z80-assembler/src/lib/assets/code/basic-line2.zx81 +9 -0
- package/libs/z80-assembler/src/lib/assets/code/characters.zx81 +190 -0
- package/libs/z80-assembler/src/lib/assets/code/display.zx81 +50 -0
- package/libs/z80-assembler/src/lib/assets/code/system-variables.zx81 +46 -0
- package/{lib/compiler/Assets.d.ts → libs/z80-assembler/src/lib/compiler/Assets.ts} +6 -1
- package/libs/z80-assembler/src/lib/compiler/Ast.ts +545 -0
- package/libs/z80-assembler/src/lib/compiler/Compiler.test.ts +2141 -0
- package/libs/z80-assembler/src/lib/compiler/Compiler.ts +185 -0
- package/libs/z80-assembler/src/lib/compiler/Formatter.ts +43 -0
- package/libs/z80-assembler/src/lib/compiler/Generator.ts +255 -0
- package/libs/z80-assembler/src/lib/compiler/Labels.ts +165 -0
- package/libs/z80-assembler/src/lib/grammar/LowLevel.ts +163 -0
- package/libs/z80-assembler/src/lib/grammar/Parse.ts +128 -0
- package/libs/z80-assembler/src/lib/grammar/z80.peg +1252 -0
- package/libs/z80-assembler/src/lib/grammar/z80.ts +10649 -0
- package/libs/z80-assembler/src/lib/types/Error.ts +105 -0
- package/{lib/types/Types.d.ts → libs/z80-assembler/src/lib/types/Types.ts} +26 -11
- package/libs/z80-assembler/tsconfig.json +23 -0
- package/libs/z80-assembler/tsconfig.lib.json +10 -0
- package/libs/z80-assembler/tsconfig.spec.json +19 -0
- package/libs/z80-assembler/vite.config.ts +58 -0
- package/nx.json +57 -0
- package/package.json +52 -14
- package/tsconfig.base.json +22 -0
- package/index.js +0 -312
- package/index.mjs +0 -6441
- package/lib/compiler/Ast.d.ts +0 -210
- package/lib/compiler/Compiler.d.ts +0 -53
- package/lib/compiler/Formatter.d.ts +0 -23
- package/lib/compiler/Generator.d.ts +0 -40
- package/lib/compiler/Labels.d.ts +0 -47
- package/lib/grammar/LowLevel.d.ts +0 -68
- package/lib/grammar/Parse.d.ts +0 -48
- package/lib/grammar/z80.d.ts +0 -2938
- package/lib/types/Error.d.ts +0 -62
- /package/{CHANGELOG.md → libs/z80-assembler/public/CHANGELOG.md} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/libs/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../.eslintrc.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
7
|
+
"rules": {}
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"files": ["*.ts", "*.tsx"],
|
|
11
|
+
"rules": {}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"files": ["*.js", "*.jsx"],
|
|
15
|
+
"rules": {}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@andrivet/z80-assembler",
|
|
3
|
+
"version": "1.3.2",
|
|
4
|
+
"description": "A Z80 assembler entirely written in Typescript and derived from a PEG grammar.",
|
|
5
|
+
"author": "Sebastien Andrivet",
|
|
6
|
+
"license": "GPLv3",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"z80",
|
|
10
|
+
"assembler",
|
|
11
|
+
"ZX81"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/andrivet/z80-assembler"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "z80-assembler",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "libs/z80-assembler/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"targets": {
|
|
7
|
+
"build": {
|
|
8
|
+
"executor": "@nx/vite:build",
|
|
9
|
+
"outputs": ["{options.outputPath}"],
|
|
10
|
+
"options": {
|
|
11
|
+
"outputPath": "dist/libs/z80-assembler"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"test": {
|
|
15
|
+
"executor": "@nx/vite:test",
|
|
16
|
+
"outputs": ["coverage/libs/z80-assembler"],
|
|
17
|
+
"options": {
|
|
18
|
+
"passWithNoTests": true,
|
|
19
|
+
"reportsDirectory": "../../coverage/libs/z80-assembler"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"lint": {
|
|
23
|
+
"executor": "@nx/linter:eslint",
|
|
24
|
+
"outputs": ["{options.outputFile}"],
|
|
25
|
+
"options": {
|
|
26
|
+
"lintFilePatterns": ["libs/z80-assembler/**/*.ts"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"compile grammar": {
|
|
30
|
+
"command": "tspeg --regex-flags=i --include-grammar-comment=false ./libs/z80-assembler/src/lib/grammar/z80.peg ./libs/z80-assembler/src/lib/grammar/z80.ts",
|
|
31
|
+
"outputs": ["./libs/z80-assembler/src/lib/grammar/z80.ts"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"tags": []
|
|
35
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# z80-assembler
|
|
2
|
+
|
|
3
|
+
A Z80 assembler library entirely written in Typescript and derived from a PEG grammar.
|
|
4
|
+
It optimized for the old ZX81 computer but can also be used with any other Z80 targets.
|
|
5
|
+
|
|
6
|
+
## Demo application
|
|
7
|
+
|
|
8
|
+
A demo application is available: https://andrivet.github.io/z80-assembler/.
|
|
9
|
+
|
|
10
|
+
## Quick guide to use the library
|
|
11
|
+
|
|
12
|
+
To install the library:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ npm install @andrivet/z80-assembler
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The main function is simply called `compile`. It takes three arguments:
|
|
19
|
+
|
|
20
|
+
* the name of the source file
|
|
21
|
+
* the Z80 source code to compile
|
|
22
|
+
* a function used to return the content of included files
|
|
23
|
+
|
|
24
|
+
It returns an object of type `CompilationInfo` with the following fields:
|
|
25
|
+
|
|
26
|
+
* `outputName`: The name of the output as set by the `output` directive.
|
|
27
|
+
* `bytes`: A array of numbers. Each element represents a byte of the generated machine code.
|
|
28
|
+
* `sld`: The Source Level Debugging data as a string. This is used in order to debug the code.
|
|
29
|
+
* `errs`: An array of errors
|
|
30
|
+
|
|
31
|
+
A typical way to use the function is:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
const info = compile(filepath, code, handleGetFileCode);
|
|
35
|
+
if(info.errs.length > 0)
|
|
36
|
+
displayErrors(info.errs);
|
|
37
|
+
else
|
|
38
|
+
saveOutput(info.outputName, info.bytes);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
You can find a complete example in the [demo application](https://github.com/andrivet/z80-assembler/), in particular in the `app.tsx` file.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## Source code
|
|
45
|
+
|
|
46
|
+
The source code is published on GitHub: https://github.com/andrivet/z80-assembler/.
|
|
47
|
+
|
|
48
|
+
## Licence
|
|
49
|
+
|
|
50
|
+
This library and associated application are released under GPLv3.
|
|
51
|
+
|
|
52
|
+
## Copyrights
|
|
53
|
+
|
|
54
|
+
Copyright (C) 2023 Sebastien Andrivet
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* License: GPLv3
|
|
8
8
|
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
9
9
|
*/
|
|
10
|
-
export * from './lib/types/Types'
|
|
10
|
+
export * from './lib/types/Types'
|
|
11
11
|
export * from './lib/types/Error';
|
|
12
12
|
export * from './lib/compiler/Compiler';
|
|
13
13
|
export * from './lib/compiler/Generator';
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
__ equ $00
|
|
2
|
+
_SPC equ $00
|
|
3
|
+
_DQT equ $0b
|
|
4
|
+
_PND equ $0c
|
|
5
|
+
_DLR equ $0d
|
|
6
|
+
_CLN equ $0e
|
|
7
|
+
_QMK equ $0f
|
|
8
|
+
_OBR equ $10
|
|
9
|
+
_CBR equ $11
|
|
10
|
+
_GTH equ $12
|
|
11
|
+
_LTH equ $13
|
|
12
|
+
_EQU equ $14
|
|
13
|
+
_PLS equ $15
|
|
14
|
+
_MNS equ $16
|
|
15
|
+
_ASK equ $17
|
|
16
|
+
_SLS equ $18
|
|
17
|
+
_SMC equ $19
|
|
18
|
+
_CMA equ $1a
|
|
19
|
+
_FST equ $1b
|
|
20
|
+
_0 equ $1c
|
|
21
|
+
_1 equ $1d
|
|
22
|
+
_2 equ $1e
|
|
23
|
+
_3 equ $1f
|
|
24
|
+
_4 equ $20
|
|
25
|
+
_5 equ $21
|
|
26
|
+
_6 equ $22
|
|
27
|
+
_7 equ $23
|
|
28
|
+
_8 equ $24
|
|
29
|
+
_9 equ $25
|
|
30
|
+
_A equ $26
|
|
31
|
+
_B equ $27
|
|
32
|
+
_C equ $28
|
|
33
|
+
_D equ $29
|
|
34
|
+
_E equ $2a
|
|
35
|
+
_F equ $2b
|
|
36
|
+
_G equ $2c
|
|
37
|
+
_H equ $2d
|
|
38
|
+
_I equ $2e
|
|
39
|
+
_J equ $2f
|
|
40
|
+
_K equ $30
|
|
41
|
+
_L equ $31
|
|
42
|
+
_M equ $32
|
|
43
|
+
_N equ $33
|
|
44
|
+
_O equ $34
|
|
45
|
+
_P equ $35
|
|
46
|
+
_Q equ $36
|
|
47
|
+
_R equ $37
|
|
48
|
+
_S equ $38
|
|
49
|
+
_T equ $39
|
|
50
|
+
_U equ $3a
|
|
51
|
+
_V equ $3b
|
|
52
|
+
_W equ $3c
|
|
53
|
+
_X equ $3d
|
|
54
|
+
_Y equ $3e
|
|
55
|
+
_Z equ $3f
|
|
56
|
+
|
|
57
|
+
_SPCV equ _SPC+$80
|
|
58
|
+
_DQTV equ _DQT+$80
|
|
59
|
+
_PNDV equ _PND+$80
|
|
60
|
+
_DLRV equ _DLR+$80
|
|
61
|
+
_CLNV equ _CLN+$80
|
|
62
|
+
_QMKV equ _QMK+$80
|
|
63
|
+
_OBRV equ _OBR+$80
|
|
64
|
+
_CBRV equ _CBR+$80
|
|
65
|
+
_GTHV equ _GTH+$80
|
|
66
|
+
_LTHV equ _LTH+$80
|
|
67
|
+
_EQUV equ _EQU+$80
|
|
68
|
+
_PLSV equ _PLS+$80
|
|
69
|
+
_MNSV equ _MNS+$80
|
|
70
|
+
_ASKV equ _ASK+$80
|
|
71
|
+
_SLSV equ _SLS+$80
|
|
72
|
+
_SMCV equ _SMC+$80
|
|
73
|
+
_CMAV equ _CMA+$80
|
|
74
|
+
_FSTV equ _FST+$80
|
|
75
|
+
_0V equ _0+$80
|
|
76
|
+
_1V equ _1+$80
|
|
77
|
+
_2V equ _2+$80
|
|
78
|
+
_3V equ _3+$80
|
|
79
|
+
_4V equ _4+$80
|
|
80
|
+
_5V equ _5+$80
|
|
81
|
+
_6V equ _6+$80
|
|
82
|
+
_7V equ _7+$80
|
|
83
|
+
_8V equ _8+$80
|
|
84
|
+
_9V equ _9+$80
|
|
85
|
+
_AV equ _A+$80
|
|
86
|
+
_BV equ _B+$80
|
|
87
|
+
_CV equ _C+$80
|
|
88
|
+
_DV equ _D+$80
|
|
89
|
+
_EV equ _E+$80
|
|
90
|
+
_FV equ _F+$80
|
|
91
|
+
_GV equ _G+$80
|
|
92
|
+
_HV equ _H+$80
|
|
93
|
+
_IV equ _I+$80
|
|
94
|
+
_JV equ _J+$80
|
|
95
|
+
_KV equ _K+$80
|
|
96
|
+
_LV equ _L+$80
|
|
97
|
+
_MV equ _M+$80
|
|
98
|
+
_NV equ _N+$80
|
|
99
|
+
_OV equ _O+$80
|
|
100
|
+
_PV equ _P+$80
|
|
101
|
+
_QV equ _Q+$80
|
|
102
|
+
_RV equ _R+$80
|
|
103
|
+
_SV equ _S+$80
|
|
104
|
+
_TV equ _T+$80
|
|
105
|
+
_UV equ _U+$80
|
|
106
|
+
_VV equ _V+$80
|
|
107
|
+
_WV equ _W+$80
|
|
108
|
+
_XV equ _X+$80
|
|
109
|
+
_YV equ _Y+$80
|
|
110
|
+
_ZV equ _Z+$80
|
|
111
|
+
|
|
112
|
+
_RND equ $40
|
|
113
|
+
_INKEY$ equ $41
|
|
114
|
+
_PI equ $42
|
|
115
|
+
_UP equ $70
|
|
116
|
+
_DOWN equ $71
|
|
117
|
+
_LEFT equ $72
|
|
118
|
+
_RIGHT equ $73
|
|
119
|
+
_GRAPHICS equ $74
|
|
120
|
+
_EDIT equ $75
|
|
121
|
+
_NEWLINE equ $76
|
|
122
|
+
_NL equ $76
|
|
123
|
+
_RUBOUT equ $77
|
|
124
|
+
_KL_MODE equ $78
|
|
125
|
+
_FUNCTION equ $79
|
|
126
|
+
_NUMBER equ $7E
|
|
127
|
+
_CURSOR equ $7F
|
|
128
|
+
_DQUOTES equ $C0
|
|
129
|
+
_AT equ $C1
|
|
130
|
+
_TAB equ $C2
|
|
131
|
+
_CODE equ $C4
|
|
132
|
+
_VAL equ $C5
|
|
133
|
+
_LEN equ $C6
|
|
134
|
+
_SIN equ $C7
|
|
135
|
+
_COS equ $C8
|
|
136
|
+
_TAN equ $C9
|
|
137
|
+
_ASN equ $CA
|
|
138
|
+
_ACS equ $CB
|
|
139
|
+
_ATN equ $CC
|
|
140
|
+
_LN equ $CD
|
|
141
|
+
_EXP equ $CE
|
|
142
|
+
_INT equ $CF
|
|
143
|
+
_SQR equ $D0
|
|
144
|
+
_SGN equ $D1
|
|
145
|
+
_ABS equ $D2
|
|
146
|
+
_PEEK equ $D3
|
|
147
|
+
_USR equ $D4
|
|
148
|
+
_STR$ equ $D5
|
|
149
|
+
_CHR$ equ $D6
|
|
150
|
+
_NOT equ $D7
|
|
151
|
+
_PWR equ $D8
|
|
152
|
+
_OR equ $D9
|
|
153
|
+
_AND equ $DA
|
|
154
|
+
_LESS equ $DB
|
|
155
|
+
_GREATER equ $DC
|
|
156
|
+
_NOT_EQUAL equ $DD
|
|
157
|
+
_THEN equ $DE
|
|
158
|
+
_TO equ $DF
|
|
159
|
+
_STEP equ $E0
|
|
160
|
+
_LPRINT equ $E1
|
|
161
|
+
_LLIST equ $E2
|
|
162
|
+
_STOP equ $E3
|
|
163
|
+
_SLOW equ $E4
|
|
164
|
+
_FAST equ $E5
|
|
165
|
+
_NEW equ $E6
|
|
166
|
+
_SCROLL equ $E7
|
|
167
|
+
_CONT equ $E8
|
|
168
|
+
_DIM equ $E9
|
|
169
|
+
_REM equ $EA
|
|
170
|
+
_FOR equ $EB
|
|
171
|
+
_GOTO equ $EC
|
|
172
|
+
_GOSUB equ $ED
|
|
173
|
+
_INPUT equ $EE
|
|
174
|
+
_LOAD equ $EF
|
|
175
|
+
_LIST equ $F0
|
|
176
|
+
_LET equ $F1
|
|
177
|
+
_PAUSE equ $F2
|
|
178
|
+
_NEXT equ $F3
|
|
179
|
+
_POKE equ $F4
|
|
180
|
+
_PRINT equ $F5
|
|
181
|
+
_PLOT equ $F6
|
|
182
|
+
_RUN equ $F7
|
|
183
|
+
_SAVE equ $F8
|
|
184
|
+
_RAND equ $F9
|
|
185
|
+
_IF equ $FA
|
|
186
|
+
_CLS equ $FB
|
|
187
|
+
_UNPLOT equ $FC
|
|
188
|
+
_CLEAR equ $FD
|
|
189
|
+
_RETURN equ $FE
|
|
190
|
+
_COPY equ $FF
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
display:
|
|
2
|
+
byte _NL
|
|
3
|
+
block 32
|
|
4
|
+
byte _NL
|
|
5
|
+
block 32
|
|
6
|
+
byte _NL
|
|
7
|
+
block 32
|
|
8
|
+
byte _NL
|
|
9
|
+
block 32
|
|
10
|
+
byte _NL
|
|
11
|
+
block 32
|
|
12
|
+
byte _NL
|
|
13
|
+
block 32
|
|
14
|
+
byte _NL
|
|
15
|
+
block 32
|
|
16
|
+
byte _NL
|
|
17
|
+
block 32
|
|
18
|
+
byte _NL
|
|
19
|
+
block 32
|
|
20
|
+
byte _NL
|
|
21
|
+
block 32
|
|
22
|
+
byte _NL
|
|
23
|
+
block 32
|
|
24
|
+
byte _NL
|
|
25
|
+
block 32
|
|
26
|
+
byte _NL
|
|
27
|
+
block 32
|
|
28
|
+
byte _NL
|
|
29
|
+
block 32
|
|
30
|
+
byte _NL
|
|
31
|
+
block 32
|
|
32
|
+
byte _NL
|
|
33
|
+
block 32
|
|
34
|
+
byte _NL
|
|
35
|
+
block 32
|
|
36
|
+
byte _NL
|
|
37
|
+
block 32
|
|
38
|
+
byte _NL
|
|
39
|
+
block 32
|
|
40
|
+
byte _NL
|
|
41
|
+
block 32
|
|
42
|
+
byte _NL
|
|
43
|
+
block 32
|
|
44
|
+
byte _NL
|
|
45
|
+
block 32
|
|
46
|
+
byte _NL
|
|
47
|
+
block 32
|
|
48
|
+
byte _NL
|
|
49
|
+
block 32
|
|
50
|
+
byte _NL
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
ERR_NR equ $4000
|
|
3
|
+
FLAGS equ $4001
|
|
4
|
+
ERR_SP equ $4002
|
|
5
|
+
RAMTOP equ $4004
|
|
6
|
+
MODE equ $4006
|
|
7
|
+
PPC equ $4007
|
|
8
|
+
|
|
9
|
+
org $4009
|
|
10
|
+
|
|
11
|
+
VERSN: byte 0
|
|
12
|
+
E_PPC: word 2
|
|
13
|
+
D_FILE: word display
|
|
14
|
+
DF_CC: word display+1
|
|
15
|
+
VARS: word variables
|
|
16
|
+
DEST: word 0
|
|
17
|
+
E_LINE: word edit_line
|
|
18
|
+
CH_ADD: word edit_line+4
|
|
19
|
+
X_PTR: word 0
|
|
20
|
+
STKBOT: word edit_line+5
|
|
21
|
+
STKEND: word edit_line+5
|
|
22
|
+
BERG: byte 0
|
|
23
|
+
MEM: word MEMBOT
|
|
24
|
+
SPARE1: byte 0
|
|
25
|
+
DF_SZ: byte 2
|
|
26
|
+
S_TOP: word 10
|
|
27
|
+
LAST_K: word $ffff
|
|
28
|
+
DB_ST: byte 0
|
|
29
|
+
MARGIN: byte 55
|
|
30
|
+
NXTLIN: word basic_line2
|
|
31
|
+
OLDPPC: word 0
|
|
32
|
+
FLAGX: byte 0
|
|
33
|
+
STRLEN: word 0
|
|
34
|
+
T_ADDR: word 0x0c8d
|
|
35
|
+
SEED: word 0
|
|
36
|
+
FRAMES: word 0
|
|
37
|
+
COORDS: byte 0
|
|
38
|
+
byte 0
|
|
39
|
+
PR_CC: byte $bc
|
|
40
|
+
S_POSN: byte $21
|
|
41
|
+
byte $18
|
|
42
|
+
CDFLAG: byte $40
|
|
43
|
+
PRBUF: block $20
|
|
44
|
+
byte _NL
|
|
45
|
+
MEMBOT: block $1e
|
|
46
|
+
SPARE2: word 0
|
|
@@ -7,10 +7,15 @@
|
|
|
7
7
|
* License: GPLv3
|
|
8
8
|
* Copyrights: Copyright (C) 2023 Sebastien Andrivet
|
|
9
9
|
*/
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
12
|
+
//@ts-nocheck
|
|
13
|
+
|
|
10
14
|
import assetCharacters from '../assets/code/characters.zx81?raw';
|
|
11
15
|
import assetSystemVariables from '../assets/code/system-variables.zx81?raw';
|
|
12
16
|
import assetBasicLine1 from '../assets/code/basic-line1.zx81?raw';
|
|
13
17
|
import assetBasicLine2 from '../assets/code/basic-line2.zx81?raw';
|
|
14
18
|
import assetDisplay from '../assets/code/display.zx81?raw';
|
|
15
19
|
import assetBasicEnd from '../assets/code/basic-end.zx81?raw';
|
|
16
|
-
|
|
20
|
+
|
|
21
|
+
export {assetCharacters, assetSystemVariables, assetBasicLine1, assetBasicLine2, assetDisplay, assetBasicEnd}
|