home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / libinc / header / misc.h65 < prev    next >
Text File  |  1993-01-19  |  1KB  |  57 lines

  1.    .if .not .def _MISC_
  2. _MISC_ = 1
  3.  
  4. ; this is also part of STD.L65
  5.  
  6.    .if .not .def _MACROS_
  7.       .include #macros
  8.    .endif
  9.  
  10.    .macro S_PRINT
  11. @3    .= @p1
  12.       .if %0 > 1
  13. @3       .= %2
  14.       .else
  15.          .if %0 = 1
  16. @3          .= @3 ! @s1
  17.          .endif
  18.       .endif
  19.       .if @3 & @s1
  20.          .if [@3 & @special]
  21.             jmp  * + %1 + 5
  22.             .byte   %$1,155,0
  23.             dpoke    _string1,*-%1-2
  24.          .else
  25.             jmp  * + %1 + 4
  26.             .byte   %$1,0
  27.             dpoke _string1,*-%1-1
  28.          .endif
  29.       .else
  30.          dpoke _string1,%1
  31.       .endif
  32.       jsr   s_print
  33.    .endm
  34.  
  35. ; KILL_LEADING_ZEROES   [EOSchar[,select]]
  36. ; see library source for more info
  37.  
  38.    .macro KILL_LEADING_ZEROES
  39. @1    .= @p1 + @special
  40.       .if %0 = 2
  41. @1    .= %2    
  42.       .endif
  43.       .if %0 <> 0
  44.          .if @1 & @special
  45.             sec
  46.          .endif
  47.          .if @1 & @p1
  48.             lda   #%1
  49.          .else
  50.             lda   %1
  51.          .endif
  52.       .endif
  53.       jsr   kill_0lead
  54.    .endm
  55.  
  56.    .endif
  57.