?login_element?

Subversion Repositories NedoOS

Rev

Rev 126 | Blame | Compare with Previous | Last modification | View Log | Download

  1. ;; while trying to compile one larger legacy code written with Zeus syntax on mind,
  2. ;; I run into lines "DJNZ .", which are basically the same thing as "DJNZ $" in sjasmplus
  3. ;; To avoid editing whole file and replacing those on each occurence, I managed to get
  4. ;; them fixed by defining this macro at beginning of the file:
  5.  
  6.     ;; fix "DJNZ ." to "DJNZ $"
  7.     MACRO DJNZ arg0?
  8.         DEFINE .._arg0?
  9.         IFDEF .._.
  10.             djnz $
  11.         ELSE
  12.             djnz arg0?
  13.         ENDIF
  14.         IFDEF .._           ;; extra test for "$" argument, that one produces ".._" define
  15.             UNDEFINE .._
  16.         ELSE
  17.             UNDEFINE .._arg0?
  18.         ENDIF
  19.     ENDM
  20.  
  21. ;; let's see it in action
  22.  
  23. OrdinaryLabelDjnz   DJNZ    OrdinaryLabelDjnz
  24.  
  25.         DJNZ    $           ;; sjasmplus syntax
  26.  
  27.         DJNZ    .           ;; Zeus syntax, will be corrected by the macro "DJNZ"
  28.  
  29.         djnz    $           ;; avoid macro by using lowercase :D
  30.