Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request boriel-basic#263 from boriel/chore/fix_attr_links
Browse files Browse the repository at this point in the history
Chore/fix attr links
  • Loading branch information
boriel committed Mar 29, 2020
2 parents 607899b + 36c6ab5 commit 2e474f5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/attr.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ PRINT AT 0, 0; "The attribute of screen position 9, 10 is "; s

##See also

* [ CSRLIN ](csrlin_.md)
* [ POS](pos_.md)
* [ AT ](at_.md)
* [ CSRLIN ](csrlin.md)
* [ POS](pos.md)
* [ AT ](at.md)
33 changes: 32 additions & 1 deletion library-asm/load.asm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage
; PRINT routine
TMP_HEADER EQU HEAD1 + 17 ; Temporary HEADER2 pointer storage

#ifdef __ENABLE_BREAK__
LD_BYTES EQU 0556h ; ROM Routine LD-BYTES
#endif

TMP_FLAG EQU 23655 ; Uses BREG as a Temporary FLAG
pop hl ; Return address
Expand Down Expand Up @@ -227,7 +230,35 @@ LOAD_END:
pop ix ; Recovers stack frame pointer
ld hl, (TMP_HEADER) ; Recovers tmp_header pointer
jp MEM_FREE ; Returns via FREE_MEM, freeing tmp header

#ifndef __ENABLE_BREAK__
LOCAL LD_BYTES_RET
LOCAL LD_BYTES_ROM
LOCAL LD_BYTES_NOINTER

LD_BYTES_ROM EQU 0562h

LD_BYTES:

inc d
ex af, af'
dec d
ld a, r
push af
di
call 0562h

LD_BYTES_RET:
; Restores DI / EI state
ex af, af'
pop af
jp po, LD_BYTES_NOINTER
ei

LD_BYTES_NOINTER:
ex af, af'
ret
#endif
ENDP


Expand Down
4 changes: 4 additions & 0 deletions zxb.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ def main(args=None):
OPTIONS.__DEFINES.value['__CHECK_ARRAY_BOUNDARY__'] = ''
zxbpp.ID_TABLE.define('__CHECK_ARRAY_BOUNDARY__', lineno=0)

if OPTIONS.enableBreak.value:
OPTIONS.__DEFINES.value['__ENABLE_BREAK__'] = ''
zxbpp.ID_TABLE.define('__ENABLE_BREAK__', lineno=0)

OPTIONS.include_path.value = options.include_path
OPTIONS.inputFileName.value = zxbparser.FILENAME = \
os.path.basename(args[0])
Expand Down

0 comments on commit 2e474f5

Please sign in to comment.