Advertisement
em00k

Untitled

Oct 22nd, 2020 (edited)
1,223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 DEVICE  ZXSPECTRUMNEXT
  2.                 ORG     0x8000
  3. StackEnd:
  4.                 ds      128
  5. StackStart:
  6.  
  7. StartAddress:
  8.               call setsysvars           ; needed for using a NEX with Cspect with no NextZXOS loaded  
  9.               call 3503                 ; clear screen
  10.           call SetChans
  11.               ld hl,Message
  12.               call PrintString
  13.               jr  $   ; loop here
  14.  
  15. SetChans:
  16.               ld a,2
  17.               call 0x1601
  18.               ret
  19.  
  20. PrintString:  ld a,(hl)
  21.               cp 255
  22.               ret z
  23.               inc hl
  24.               rst 16
  25.               jr PrintString
  26.  
  27. setsysvars:
  28.               ld hl,sysvars
  29.               ld de,23552
  30.               ld bc,256
  31.               ldir
  32.               ld iy,$5c3a                                        ; require for rom some calls
  33.               ld a,0 : ld (23606),a : ld a,60 : ld (23607),a     ; sets font correctly
  34.               ret        
  35. sysvars:   
  36.   ; copy of sysvars
  37.   DB $FF, $00, $00, $00, $FF, $00, $23, $0D, $0D, $23, $02, $00, $00, $00
  38.   DB $16, $00, $01, $00, $06, $00, $0B, $00, $01, $00, $01, $00, $06, $00
  39.   DB $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
  40.   DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $D5, $80
  41.   DB $40, $00, $FF, $9C, $00, $FC, $5F, $00, $00, $00, $01, $00, $FF, $1E
  42.   DB $00, $01, $0F, $00, $00, $F7, $5C, $00, $00, $B6, $5C, $BB, $5C, $CB
  43.   DB $5C, $F7, $5C, $CA, $5C, $F8, $5C, $FC, $5C, $F6, $5C, $30, $5D, $FD
  44.   DB $5C, $FD, $5C, $FD, $5C, $02, $92, $5C, $00, $02, $00, $00, $00, $00
  45.   DB $00, $00, $00, $00, $69, $17, $00, $00, $75, $00, $00, $58, $FF, $00
  46.   DB $00, $00, $00, $00, $21, $17, $54, $40, $E0, $50, $0D, $16, $21, $17
  47.   DB $01, $38, $56, $38, $56, $00, $00, $00, $00, $00, $00, $00, $00, $00
  48.   DB $00, $00, $00, $00, $00, $00, $00, $02, $03, $00, $00, $00, $00, $00
  49.   DB $00, $00, $02, $02, $02, $00, $00, $00, $00, $00, $FF, $5F, $FF, $FF
  50.   DB $F4, $09, $A8, $10, $4B, $F4, $09, $C4, $15, $53, $81, $0F, $C4, $15
  51.   DB $52, $34, $5B, $2F, $5B, $50, $80, $00, $0A, $0D, $00, $FD, $32, $34
  52.   DB $35, $37, $35, $0E, $00, $00, $FF, $5F, $00, $0D, $00, $14, $05, $00
  53.   DB $EF, $22, $22, $AF, $0D, $00, $1E, $0E, $00, $F9, $C0, $32, $34, $35
  54.   DB $37, $36, $0E, $00, $00, $00, $60, $00, $0D, $80, $EF, $22, $22, $0D
  55.   DB $80, $00, $33, $80
  56.  
  57. Message: db 'Wahoo Ive printed to Screen from Assembley Language! Hello World eat your heart out!',255
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement