From e6dd4a91e2c148cea74ab7867f77c0601c891118 Mon Sep 17 00:00:00 2001 From: Romain Giot Date: Mon, 21 Aug 2023 01:00:33 +0200 Subject: [PATCH] Start to write the documentation of BASM --- cpclib-asm/basm_doc.md | 222 --------- cpclib-basm/docs/cmdline.md | 39 ++ cpclib-basm/docs/directives.md | 470 ++++++++++++++++++ cpclib-basm/docs/expressions.md | 14 + cpclib-basm/docs/index.md | 41 ++ cpclib-basm/docs/syntax.md | 190 +++++++ cpclib-basm/mkdocs.yml | 25 + .../tests/asm/good_fake_instructions.asm | 7 +- .../tests/asm/good_fake_instructions.equiv | 10 +- cpclib-basm/tests/asm/good_macro_rasmdoc.asm | 1 + 10 files changed, 792 insertions(+), 227 deletions(-) delete mode 100644 cpclib-asm/basm_doc.md create mode 100644 cpclib-basm/docs/cmdline.md create mode 100644 cpclib-basm/docs/directives.md create mode 100644 cpclib-basm/docs/expressions.md create mode 100644 cpclib-basm/docs/index.md create mode 100644 cpclib-basm/docs/syntax.md create mode 100644 cpclib-basm/mkdocs.yml diff --git a/cpclib-asm/basm_doc.md b/cpclib-asm/basm_doc.md deleted file mode 100644 index cb4d3ef2..00000000 --- a/cpclib-asm/basm_doc.md +++ /dev/null @@ -1,222 +0,0 @@ ---- -title: BASM documentation - WIP ---- - -# Command line arguments - -- --snapshot: save output in an Amstrad CPC snapshot instead of a single file -- --lst [fname]: also generate the listing of the assembled program. Standard output is used if fname is - - -# Z80 Syntax - -## General syntax - -## Labels handling - -basm is quite lax on the z80 format: it does not impose to start a label at the very first char of a line and does not force an instruction or directive to not start at the very first line of a char. -As a consequence there can be ambiguities between labels and macros. -If it fails in properly recognizing macros or label, you can guide it by suffixing label declaration by : or by using (void) for macros with no arguments. - -## Fake instructions - -## Comments - -## Expressions - -## Provided functions - -- `duration(instruction)` returns the number of nop of the instruction -- mode0_byte_to_pen_at -- mode1_byte_to_pen_at -- mode2_byte_to_pen_at -- pen_at_mode0_byte -- pen_at_mode1_byte -- pen_at_mode2_byte -- pens_to_mode0_byte -- pens_to_mode1_byte -- pens_to_mode2_byte -- list_new -- list_get(LIST, INDEX) -- list_set -- list_len -- `list_sublist(list, start, end)` -> list: Return a new list from start until end not included -- list_sort -- list_argsort -- list_push -- string_new -- string_push -- string_concat -- string_from_list -- assemble -- matrix_new -- matrix_set -- matrix_get -- matrix_col -- matrix_row -- matrix_set_row -- matrix_set_col -- matrix_width -- matrix_height -- `load(fname) -> list of bytes`: return the bytes from the given file name - -## User defined functions - -Function, endf - -# Directives - -## Memory related - - -### CONFINED - -Confine a memory area of 256 bytes maximum in such a way that it is always possible to navigate in the data by only modifying the low byte address (*i.e* INC L always works). - -CONFINED - ... -ENDCONFINED - -### ORG - -### ALIGN - -### LIMIT - -On the code space ($), not physical space ($$) - -### PROTECT - -On the code space ($), not physical space ($$) - -### BANK - -When used with no argument, a bank corresponds to a memory area outside of the snapshot. All things read&write in memory are thus uncorrelated to the snapshot. -Sections do not apply in a bank. - -`BANK page` is similar to `WRITE DIRECT -1 -1 page` - -## Labels related - -## = - -## EQU - -## Data related - -### BYTE, TEXT, DB, DEFB, DM, DEFM - -### WORD, DW, DEFW - -### STR - -### CHARSET - -## Conditional directives - -### IF, IFNOT - -### IFDEF, IFNDEF - - -## Code duplication directives - -### WHILE - -### REPEAT - -REPEAT AMOUNT [, COUNTER [, START]] - INNER LISTING -REND -### ITERATE - -ITERATE COUNTER, EXPR... - INNER LISTING -IEND - -The expression $i$ is evaluated after having generated the code of expression $i-1$. Take that into account if expressions use $. - - iterate value, 1, 2, 10 - add {value} - jr nz, @no_inc - inc c -@no_inc - call do_stuff - iend - -do_stuff - ret - -## Code and data generation directives - -### MACRO - -### STRUCT - -## Data loading and transformation directives - -Filenames are stored in a string. -These string can do expansion of formulas embedded in {}. - -basm embeds some files in its executable, they are access under the name "inner://" : -### LZAPU, LZ48, LZ49 - -### INCBIN, BINCLUDE - -INCBIN|BINCLUDE "fname" [[, SKIP], AMOUNT] - - -Fname can be build with variables. - -Limitations: - -- File is loaded fully in memory before being sliced depending on arguments. - -### INCLUDE, READ - -`INCLUDE|READ [ONCE] "fname" [AS|MODULE|NAMESPACE "module"]` - -Fname can be build with variables. - -## Data saving and export - -### EXPORT, NOEXPORT - -### WRITE - - -## Debug directives - -### ASSERT - -### PRINT - -## Amstrad CPC related directives - -### TICKER - -Compute the execution duration of a block of code - -``` -TICKER START variable - instructions -TICKER STOP -``` - <../cpclib-basm/tests/asm/good_timing.asm> - -### WAITNOPS - -Generate a list of instructions that do not modify any registers or memory but is executed with the expected amount of nops. -(Currently it is synonym of NOP, but as soon as someone wants to provide clever rules to use less bytes, I'll implement them) - -### LOCOMOTIVEBASIC - -### SNASET - -# Expression handling - -## Special variables - - - $: get the current code address - - $$: get the current output address - -## Special functions \ No newline at end of file diff --git a/cpclib-basm/docs/cmdline.md b/cpclib-basm/docs/cmdline.md new file mode 100644 index 00000000..47680ac4 --- /dev/null +++ b/cpclib-basm/docs/cmdline.md @@ -0,0 +1,39 @@ +# Command line arguments + +Here is the help provided by `basm`. + +``` +Profile debug compiled: Sun, 20 Aug 2023 20:55:05 +0000 + +Benediction ASM -- z80 assembler that mainly targets Amstrad CPC + +Usage: basm.exe [OPTIONS] [INPUT] + +Arguments: + [INPUT] Input file to read. + +Options: + --inline Z80 code is provided inline + -o, --output Filename of the output. + --db Write a db list on screen (usefull to get the value of an opcode) + --lst Filename of the listing output. + --sym Filename of the output symbols file. + --sym_kind Format of the output symbols file [default: basm] [possible values: winape, basm] + --basic Request a Basic header (the very first instruction has to be the LOCOMOTIVE directive). + --binary Request a binary header + --snapshot Generate a snapshot + -i, --case-insensitive Configure the assembler to be case insensitive. + -d, --directives-prefixed-by-dot Expect directives to by prefixed with a dot + -I, --include Provide additional directories used to search files + -D, --define Provide a symbol with its value (default set to 1) + --m4 Provide the IP address of the M4 + -l Load symbols from the given file + --Werror Warning are considered to be errors + --progress Show a progress bar. + --list-embedded List the embedded files + --view-embedded Display one specific embedded file [possible values: inner://crtc.asm, inner://deexo.asm, inner://dzx0_fast.asm, inner://dzx0_standard.asm, inner://firmware/amsdos.asm, inner://firmware/casmng.asm, inner://firmware/gfxvdu.asm, inner://firmware/highkern.asm, inner://firmware/indirect.asm, inner://firmware/kernel.asm, inner://firmware/keymng.asm, inner://firmware/lowkern.asm, inner://firmware/machine.asm, inner://firmware/math6128.asm, inner://firmware/mathnot464.asm, inner://firmware/mathnot6xx.asm, inner://firmware/not464.asm, inner://firmware/scrpack.asm, inner://firmware/sound.asm, inner://firmware/txtvdu.asm, inner://ga.asm, inner://lz48decrunch.asm, inner://lz49decrunch.asm, inner://lz4_docent.asm, inner://opcodes_first_byte.asm, inner://pixels-routs.asm, inner://unaplib.asm, inner://unaplib_fast.asm] + -h, --help Print help + -V, --version Print version + +Still a Work In Progress assembler +``` \ No newline at end of file diff --git a/cpclib-basm/docs/directives.md b/cpclib-basm/docs/directives.md new file mode 100644 index 00000000..ce400fe2 --- /dev/null +++ b/cpclib-basm/docs/directives.md @@ -0,0 +1,470 @@ + + +# Directives + +!!! failure Inacurate documentation + + Not all directives have their synopsis, explanation, and examples + + +## Listing related + +### LIST, NOLIST +Example: + +```z80 +--8<-- "tests/asm/good_list.asm" +``` + + +## Memory related + +### ALIGN + +Example: + +```z80 +--8<-- "tests/asm/good_align.asm" +``` + + +### CONFINED + +Confine a memory area of 256 bytes maximum in such a way that it is always possible to navigate in the data by only modifying the low byte address (*i.e* INC L always works). + +``` +CONFINED + LISTING +ENDCONFINED +``` + +```z80 +--8<-- "tests/asm/good_confined.asm" +``` + + +### ORG + + + +### LIMIT + +On the code space ($), not physical space ($$) + +Example of code that assembles: +```z80 +--8<-- "tests/asm/good_limit.asm" +``` + +Example of code that fails: +```z80 +--8<-- "tests/asm/wrong_limit.asm" +``` + +### PHASE, DEPHASE + +```z80 +--8<-- "tests/asm/good_phase.asm" +``` + +### PROTECT + +Synopsis: +``` +PROTECT START, STOP +``` +Description: +Mark the memory between START and STOP as protected against write. Assembler fails when writting there. + +On the code space ($), not physical space ($$) + +Example: +```z80 +--8<-- "tests/asm/good_protect.asm" +``` + + +### RANGE, SECTION + +Description: +RANGE allows to define named portion of the memory, while SECTION allows to chose the portion of interest. + +Example: +```z80 +--8<-- "tests/asm/good_section.asm" +``` + +### BANK + +Description: + +When used with no argument, a bank corresponds to a memory area outside of the snapshot. All things read&write in memory are thus uncorrelated to the snapshot. +Sections do not apply in a bank. + +`BANK page` is similar to `WRITE DIRECT -1 -1 page` + + +Synopsis: + +``` +BANK [EXPRESSION] +``` + +Example: +```z80 +--8<-- "tests/asm/good_bank.asm" +``` + +#### BANKSET + +Synopsis: + +``` +BANKSET EXPRESSION +``` + +Example: +```z80 +--8<-- "tests/asm/good_bankset.asm" +``` + +#### WRITE DIRECT + +Description: +WRITE DIRECT is a directive from Winape that we have not fully reproduced. It's two first arguments need to be -1. + +Example: +```z80 +--8<-- "tests/asm/good_write_direct.asm" +``` + +## Labels related + +### =, SET + +Description: + +Assign an expression to a label. Assignement can be repeated several times. + +Synopsis: +``` +LABEL = EXPRESSION +``` + +Example: +```z80 +--8<-- "tests/asm/good_assign.asm" +``` + + +### EQU + +Description: +Assign an expression to a label. Assignement cannot be repeated several times. + + +Synopsis: +``` +LABEL = EXPRESSION +``` + +Example: +```z80 +--8<-- "tests/asm/good_assign.asm" +``` + +### SETN, NEXT + +Example: +```z80 +--8<-- "tests/asm/good_next.asm" +``` + + +## Data related + +### BYTE, TEXT, DB, DEFB, DM, DEFM + +Example: +```z80 +--8<-- "tests/asm/good_db.asm" +``` + +### WORD, DW, DEFW + +### DEFS + +Example: +```z80 +--8<-- "tests/asm/good_defs.asm" +``` + +### STR + +Description: +STR encodes string in AMSDOS format (i.e., adds 0x80 to the last char) and stores its bytes in memory. + +Example: +```z80 +--8<-- "tests/asm/good_str.asm" +``` + +### CHARSET + +Example: +```z80 +--8<-- "tests/asm/good_charset.asm" +``` + + +## Conditional directives + +### IF, IFNOT + +### IFDEF, IFNDEF + +Example: +```z80 +--8<-- "tests/asm/good_ifndef.asm" +``` + +### IFUSED + +Example: +```z80 +--8<-- "tests/asm/good_ifused.asm" +``` + +### Nested conditions + +Conditions can be nested. + +Example: +```z80 +--8<-- "tests/asm/good_if.asm" +``` + + +### SWITCH, ENDSWITCH + +Example: +```z80 +--8<-- "tests/asm/good_switch.asm" +``` + +## Code duplication directives + +### FOR + +``` +FOR [, EXPRESSION]+ + LISTING +ENDFOR|FEND +``` + +Example: +```z80 +--8<-- "tests/asm/good_for.asm" +``` +Corresponds to +```z80 +--8<-- "tests/asm/good_for.equiv" +``` + + +### WHILE + +```z80 +--8<-- "tests/asm/good_while.asm" +``` + +### REPEAT + +REPEAT AMOUNT [, COUNTER [, START]] + INNER LISTING +REND + + +```z80 +--8<-- "tests/asm/good_repeat_incbin2.asm" +``` + +### ITERATE + +``` +ITERATE COUNTER, EXPR... + INNER LISTING +IEND +``` + +The expression $i$ is evaluated after having generated the code of expression $i-1$. Take that into account if expressions use $. + + +Example: +```z80 +--8<-- "tests/asm/good_iter.asm" +``` +Corresponds to: +```z80 +--8<-- "tests/asm/good_iter.equiv" +``` + +## Code and data generation directives + +### MACRO + +Example of standard macro: +```z80 +--8<-- "tests/asm/good_macro_rasmdoc.asm" +``` + +Example of macro using raw arguments: +```z80 +--8<-- "tests/asm/good_macro_raw_input.asm" +``` + + +### STRUCT + + +Standard example: +```z80 +--8<-- "tests/asm/good_struct.asm" +``` + +Example using default values: +```z80 +--8<-- "tests/asm/good_struct2.asm" +``` + +## Data loading and transformation directives + +Filenames are stored in a string. +These string can do expansion of formulas embedded in {}. + +basm embeds some files in its executable, they are access under the name "inner://" : + +### LZAPU, LZ48, LZ49 + +Example: +```z80 +--8<-- "tests/asm/good_aplib_decrunch.asm" +``` + + +### INCBIN, BINCLUDE + + + +`INCBIN|BINCLUDE "fname" [[, SKIP], AMOUNT]` + + +Fname can be build with variables. + +Limitations: + +- File is loaded fully in memory before being sliced depending on arguments. + + +Example: +```z80 +--8<-- "tests/asm/good_incbin3.asm" +``` +with `AZERTY.TXT` containing the text `AZERTYUIOPQSDFGHJKLMWXCVBN`. + + +### INCLUDE, READ + +`INCLUDE|READ [ONCE] "" [AS|MODULE|NAMESPACE ""]` + +Fname can be build with variables. + +Example with once: +```z80 +--8<-- "tests/asm/good_include2.asm" +``` + +Example with namespace: +```z80 +--8<-- "tests/asm/good_include3.asm" +``` + +Files prefixed by `inner://` are embedded by `BASM`. +Example: +```z80 +--8<-- "tests/asm/good_embedd.asm" +``` + +In case of conditional assembling, inclusion are only done in the executed branch. This code always assemble as it never includes 'unknonw' file. + +```z80 +--8<-- "tests/asm/good_noinclude.asm" +``` + +## Data saving and export + +### EXPORT, NOEXPORT + +Example: +```z80 +--8<-- "tests/asm/good_export.asm" +``` + + +### WRITE + + +## Debug directives + +### ASSERT + +``` +ASSERT BOOLEAN_EXPRESSION [, PRINTABLE_EXPRESSION]* +``` + +### PRINT + +Example: +```z80 +--8<-- "tests/asm/good_print.asm" +``` + + +## Amstrad CPC related directives + +### TICKER + +Description: +Compute the execution duration of a block of code + +Synopsys: +``` +TICKER START variable + instructions +TICKER STOP +``` + +Example 1: +```z80 +--8<-- "tests/asm/good_cycle.asm" +``` + +Example 2: +```z80 +--8<-- "tests/asm/good_timing.asm" +``` + +### WAITNOPS + +Generate a list of instructions that do not modify any registers or memory but is executed with the expected amount of nops. +(Currently it is synonym of NOP, but as soon as someone wants to provide clever rules to use less bytes, I'll implement them) + +### LOCOMOTIVE + +```z80 +--8<-- "tests/asm/good_basic.asm" +``` + + + +### SNASET \ No newline at end of file diff --git a/cpclib-basm/docs/expressions.md b/cpclib-basm/docs/expressions.md new file mode 100644 index 00000000..04699704 --- /dev/null +++ b/cpclib-basm/docs/expressions.md @@ -0,0 +1,14 @@ +# Expression handling + +## Special variables + + - $: get the current code address + - $$: get the current output address + + +Example: +```z80 +--8<-- "tests/asm/good_dollar.asm" +``` + +## Special functions \ No newline at end of file diff --git a/cpclib-basm/docs/index.md b/cpclib-basm/docs/index.md new file mode 100644 index 00000000..14274cd3 --- /dev/null +++ b/cpclib-basm/docs/index.md @@ -0,0 +1,41 @@ +--- +title: BASM documentation - WIP +authors: + - Krusty/Benediction +--- + + +# BASM + +Benediction ASsembler (`BASM` in short) is a modern Z80 assembler. +He has taken its inspiration from various Z80 assembler (Maxam/[Winape](http://www.winape.net/help/), [sjasmplus](https://github.com/z00m128/sjasmplus), [rasm](https://github.com/EdouardBERGE/rasm), [vasm](http://sun.hasenbraten.de/vasm/), [BRASS](https://benryves.com/bin/brass/), [glass](https://grauw.nl/projects/glass/), [zasm](https://k1.spdns.de/Develop/Projects/zasm)) as well as assemblers from other platforms ([asm11](http://www.aspisys.com/asm11man.htm), [sarcasm](https://www.ecstaticlyrics.com/electronics/Z80/sarcasm/)). +It is tailored for Amstrad CPC demomaking and has been successfully used to develop the Amstrad CPC demo [Can Robots Take Control?](https://www.pouet.net/prod.php?which=88554). +It has been still improved since and will serve for futur productions too. + + +The documentation is quite minimal at the moment, but included example code should be still valid and assembled propetly. +The user base being quite small, lots of bugs can remain. Do note hesitate to fill issues or propose fixes. + + +# Features of Interest + +- Possibility to assemble fake instructions (e.g. `ld hl, de`). +- Possibility to use standard directives (e.g. `incbin 'file.asm`). +- Rare directives and functions (e.g. `ld a, opcode(xor a)`). +- Macros definition and usage (e.g. `MY_MACRO_WITH_TWO_ARGS 1, "string"`). +- Function definition and usage (e.g. `db 5, my_function(3)`). +- Expressions able to handle numbers, strings, lists, matrices. +- Handling of Amstrad CPC snapshots. +- Possibility to execute directly the assembled project in the Amstrad CPC thanks to the M4/CPC WIFI card. +- Multi-pass (in fact, `BASM` uses as many passes as needed). +- Multiplatform (mainly tested on Linux and Windows). +- Embedding of various ASM source files inside `BASM` that can be used by the users. +- Possibility to write LOCOMOTIVE BASIC for easily writting Amstrad CPC bootstrap loaders. + + +# Hello World + +An hello world representative of the functionalities of `BASM` would be: +```z80 +--8<-- "tests/asm/good_hello_world.asm" +``` \ No newline at end of file diff --git a/cpclib-basm/docs/syntax.md b/cpclib-basm/docs/syntax.md new file mode 100644 index 00000000..4d5cbd9a --- /dev/null +++ b/cpclib-basm/docs/syntax.md @@ -0,0 +1,190 @@ +# Z80 Syntax + +## General syntax + +``` +LABEL OPCODE1 + OPCODE2 : OPCODE3 + DIRECTIVE +``` + + + +!!! warning + + There may be still some subtle parser bugs, but it is possible to span instructions and directives on several lines by ending the previous line with `\` + +## Labels handling + +`BASM` is quite lax on the z80 format: it does not impose to start a label at the very first char of a line and does not force an instruction or directive to not start at the very first line of a char (behavior stolen to `rasm`). +As a consequence there can be ambiguities between labels and macros. +If it fails in properly recognizing macros or label, you can guide it by suffixing label declaration by : or by using (void) for macros with no arguments. + + +### Local labels +```z80 +--8<-- "tests/asm/good_labels.asm" +``` + +### module handling + +```z80 +--8<-- "tests/asm/good_module.asm" +``` +would generate a binary similar to +```z80 +--8<-- "tests/asm/good_module.equiv" +``` + +### Labels generation + +Labels can be generated thanks to the content of other ones. +```z80 +--8<-- "tests/asm/good_labels_generated.asm" +``` + +## Instructions + +Here is the list of instructions used to validate `BASM`: + +```z80 +--8<-- "tests/asm/good_all.asm" +``` + +## Fake instructions + +To ease coding, several fake instructions are allowed by `BASM`. It replaces them by the combination of true instructions. + +Here is a subset of the possibilities. + +!!! failure Inacurate documentation + + Most fake instructions are missing + +```z80 +--8<-- "tests/asm/good_fake_instructions.asm" +``` + +## Comments + +## Expressions + +## Provided functions + +!!! failure Inacurate documentation + + Need to document all functions + +### Z80 related functions + +#### assemble + + +`assemble(str)` consider the string `str` to be a list of instructions (no directives) and returns the list of bytes corresponding to the assembled version of the given string. + + + +```z80 +--8<-- "tests/asm/good_assemble.asm" +``` + +#### duration + +- `duration(instruction)` returns the number of nop of the instruction + +#### opcode + +```z80 +--8<-- "tests/asm/good_opcode.asm" +``` + +### Amstrad CPC video handling + +- mode0_byte_to_pen_at +- mode1_byte_to_pen_at +- mode2_byte_to_pen_at +- pen_at_mode0_byte +- pen_at_mode1_byte +- pen_at_mode2_byte +- pens_to_mode0_byte +- pens_to_mode1_byte +- pens_to_mode2_byte + + +```z80 +--8<-- "tests/asm/good_`pixels`.asm" +``` + +### List handling + +- list_new +- list_get(LIST, INDEX) +- list_set +- list_len +- `list_sublist(list, start, end)` -> list: Return a new list from start until end not included +- list_sort +- list_argsort +- list_push + +### String handling +- string_new +- string_push +- string_concat +- string_from_list + +### Matrix handling + +- matrix_new +- matrix_set +- matrix_get +- matrix_col +- matrix_row +- matrix_set_row +- matrix_set_col +- matrix_width +- matrix_height + +### File handing + +- `load(fname) -> list of bytes`: return the bytes from the given file name + + +### Memory handling + +#### memory(addr) + + +```z80 +--8<-- "tests/asm/good_memory.asm" +``` + + +## User defined functions + + +`BASM` allows to define functions that can be used in any expression. +The functions are fed with parameters and execute conditional directives as well as directives able to handle variables. +They finish at the execution of the `RETURN` directive. + +``` +FUNCTION [ARG1 [, ARGN]] + INSTRUCTIONS + RETURN VALUE +ENDFUNCTION +``` + +!!! failure Inacurate documentation + + Better explain how to build function + + +Example of the fibonacci function: + +```z80 +--8<-- "tests/asm/good_fibonacci.asm" +``` + +Example of function to handle lists: +```z80 +--8<-- "tests/asm/good_function_load.asm" +``` \ No newline at end of file diff --git a/cpclib-basm/mkdocs.yml b/cpclib-basm/mkdocs.yml new file mode 100644 index 00000000..7144197d --- /dev/null +++ b/cpclib-basm/mkdocs.yml @@ -0,0 +1,25 @@ +nav: + - Home: 'index.md' + - Command line: 'cmdline.md' + - Syntax: 'syntax.md' + - Expressions: 'expressions.md' + - Directives: 'directives.md' +site_name: "Benediction ASseMbler" +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.details + - admonition +theme: + name: material + features: + - navigation.instant + - navigation.tabs +plugins: + - search +repo_url: https://github.com/cpcsdk/rust.cpclib \ No newline at end of file diff --git a/cpclib-basm/tests/asm/good_fake_instructions.asm b/cpclib-basm/tests/asm/good_fake_instructions.asm index aeda4f75..8ae31bcf 100644 --- a/cpclib-basm/tests/asm/good_fake_instructions.asm +++ b/cpclib-basm/tests/asm/good_fake_instructions.asm @@ -1,5 +1,8 @@ - org 0x1000 - ld hl, de + jp hl + jp ix + jp iy + push hl, de, bc + pop bc, de, hl \ No newline at end of file diff --git a/cpclib-basm/tests/asm/good_fake_instructions.equiv b/cpclib-basm/tests/asm/good_fake_instructions.equiv index 6904747b..cb07d4b5 100644 --- a/cpclib-basm/tests/asm/good_fake_instructions.equiv +++ b/cpclib-basm/tests/asm/good_fake_instructions.equiv @@ -1,6 +1,10 @@ - org 0x1000 + ld l, e : ld h, d + jp (hl) + jp (ix) + jp (iy) + push hl : push de : push bc + pop bc : pop de : pop hl + - ld l, e - ld h, d \ No newline at end of file diff --git a/cpclib-basm/tests/asm/good_macro_rasmdoc.asm b/cpclib-basm/tests/asm/good_macro_rasmdoc.asm index cb3279ab..7f477c6d 100644 --- a/cpclib-basm/tests/asm/good_macro_rasmdoc.asm +++ b/cpclib-basm/tests/asm/good_macro_rasmdoc.asm @@ -1,3 +1,4 @@ + ; rasm inspired macro LDIXREG register,dep if {dep}<-128 || {dep}>127 push BC