Skip to content

Instantly share code, notes, and snippets.

@shred
Created May 3, 2020 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shred/66fd59b2db47111ba996caacefa0c46a to your computer and use it in GitHub Desktop.
Save shred/66fd59b2db47111ba996caacefa0c46a to your computer and use it in GitHub Desktop.
Spectrum Next Hello World
DEVICE ZXSPECTRUMNEXT
ROM_PRINT_A EQU $0010
ROM_CLS EQU $0D6B
ROM_CHAN_OPEN EQU $1601
SYS_BORDCR EQU 23624
SYS_ATTR_P EQU 23693
ORG 0x8000
START LD A, %00000111
LD (SYS_BORDCR), A
LD (SYS_ATTR_P), A
CALL ROM_CLS
LD A, 2
CALL ROM_CHAN_OPEN
LD HL, TEXT
CALL PRTMES
JR $
PRTMES LD A, (HL)
CP 255
RET Z
RST ROM_PRINT_A
INC HL
JR PRTMES
TEXT BYTE "Hello World", 255
SAVENEX OPEN "helloworld.nex", START, $FF40
SAVENEX CORE 3, 0, 0
SAVENEX CFG 7, 0, 1, 0
SAVENEX AUTO
SAVENEX CLOSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment