Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arch/zx48k/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2176,13 +2176,13 @@ def emit_start():
output = list()
output.append('org %s' % OPTIONS.org.value)

if OPTIONS.headerless.value:
return output

if REQUIRES.intersection(MEMINITS) or '__MEM_INIT' in INITS:
output.append('; Defines HEAP SIZE\n' + OPTIONS.heap_size_label.value + ' EQU ' + str(OPTIONS.heap_size.value))

output.append('%s:' % START_LABEL)
if OPTIONS.headerless.value:
return output

output.append('di')
output.append('push ix')
output.append('push iy')
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/headerless.asm
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
org 32768
__START_PROGRAM:
ld hl, _a
inc (hl)
ld hl, 0
ld b, h
ld c, l
__END_PROGRAM:
ret

ZXBASIC_USER_DATA:
_a:
DEFB 02h
; Defines DATA END --> HEAP size is 0
ZXBASIC_USER_DATA_END EQU ZXBASIC_MEM_HEAP
; Defines USER DATA Length in bytes
ZXBASIC_USER_DATA_LEN EQU ZXBASIC_USER_DATA_END - ZXBASIC_USER_DATA
END
END __START_PROGRAM
1 change: 1 addition & 0 deletions tests/functional/headerless.bas
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
REM a headerless (no prologuqe in ASM) program
#pragma headerless=true
#pragma autorun=true

DIM a as UByte = 2
LET a = a + 1
Expand Down