?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ; (this is example how sjasmplus can be exploited as byte-processor over file content)
  2. ;
  3. ; script to convert 1bpp font (like original ZX ROM font, .ch8 files or .udg files)
  4. ; to assembly source form using `DG` directive, so you can see/modify the pixels
  5. ; in your text editor while editing code, if you prefer this style of workflow
  6. ; (over including the binary form by `INCBIN`).
  7. ;
  8. ; usage: sjasmplus chargfx2asm.script.asm -DFIN="input.ch8" -DFOUT="result.asm"
  9. ;
  10. ; The example "ZX Courier.ch8" file is font by DamienG: https://damieng.com/zx-origins
  11. ; Check Damien's amazing site for font's license details and other fonts.
  12.  
  13.     ; default example file names in case they are not provided on command line
  14.     IFNDEF FIN : DEFINE FIN "ZX Courier.ch8" : ENDIF
  15.     IFNDEF FOUT : DEFINE FOUT "ZX Courier.ch8.i.asm" : ENDIF
  16.  
  17.     DEVICE ZXSPECTRUM48 : ORG 0 : INCBIN FIN
  18. udgEnd:
  19. udgB=0
  20.         OUTPUT FOUT
  21.             DUP udgEnd
  22.                 IFN udgB%8 : DB "\n" : ENDIF
  23.                 DB "\tDG  "
  24. mask=0x80
  25.                 DUP 8
  26.                     IF mask & {b udgB} : DB '#' : ELSE : DB '-' : ENDIF
  27. mask=mask>>1
  28.                 EDUP
  29.                 DB "\n"
  30. udgB=udgB+1
  31.             EDUP
  32.         OUTEND
  33.