?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. ; a bit "like real" example with actual ZX Next binary to verify some debugger the SLD parsing
  2. ; to launch the final NEX file in CSpect with map file:
  3. ;  CSpect.exe [your other preferred options] -map=sld_example.sym sld_example.nex
  4.     DEVICE ZXSPECTRUMNEXT
  5.     SLDOPT COMMENT WPMEM
  6.  
  7. WAIT_DELAY EQU 21
  8. CSPECT_EASY EQU $A8     ; use $00 to confuse CSpect disassembly window in single-stepping
  9.  
  10.     MACRO docolor col8b?
  11.         nextreg $4A,col8b?  ; transparency fallback register
  12.         ld b,WAIT_DELAY
  13.         djnz $
  14.     ENDM
  15.  
  16.     INCLUDE "sld_example/include.i.asm"
  17.  
  18.     ORG 35000
  19. start:
  20.     di
  21.     nextreg $07,0       ; 3.5MHz
  22.     nextreg $68,$80     ; switch ULA off
  23. .loop:
  24.     someMacro1
  25.     someMacro2
  26.     nextreg $56,20
  27.     call mmu6p20
  28.     docolor $00         ; black
  29.     nextreg $57,32
  30.     jr .loop
  31.  
  32.     IF 0    ; make sure the skipped-blocks don't produce SLD data
  33.         someMacro2
  34.         DB $EE  ; WPMEM
  35.     ENDIF
  36.     /*      ; make sure the comment-blocks don't produce SLD data
  37.         someMacro2
  38.         DB $EE  ; WPMEM
  39.     */
  40.  
  41.     SAVENEX OPEN "sld_example.nex", start, 40000 : SAVENEX AUTO : SAVENEX CLOSE
  42.     CSPECTMAP "sld_example.sym"
  43.