?login_element?

Subversion Repositories NedoOS

Rev

Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.     org     0x1234          ; eol comment belong to ORG
  3.     lua allpass ; machine code needs to be emitted in *every* pass (and the same one)
  4.         sj.parse_line("allpass_1: rrca")    -- try without EOL comment first
  5.         sj.parse_line("allpass_2: rra      ; with eol comment") -- *with*
  6.         sj.parse_line("allpass_3: cpl")     -- *without*
  7.         _pl("allpass_4: inc bc")
  8.         _pl("allpass_5: inc de      ; with eol comment 2")
  9.         _pl("allpass_6: inc hl")
  10.     endlua
  11.     lua         ; [pass default] == pass3 - this is not good for ASM parsing lines!
  12.         sj.parse_line("pass_default: rlca      ; this will cause problems")
  13.         _pl("pass_default_2: rla      ; same with _pl alias")
  14.     endlua
  15.     lua pass1   ; pass1 this is also insufficient to generate valid machine code
  16.         sj.parse_line("pass1: daa      ; will define label, but machine code will be missing")
  17.         _pl("pass1_2: scf      ; same with _pl alias")
  18.     endlua
  19.  
  20.     ;check lua wrappers to survive invalid args and report assembling errors
  21.     lua allpass
  22.         sj.parse_line(nil)
  23.         sj.parse_line("")
  24.         sj.parse_line("invalid_1: invalid")
  25.         sj.parse_line(2) -- becomes string "2" -> temporary label (valid asm syntax)
  26.         _pl(nil)
  27.         _pl("")
  28.         _pl("invalid_3: invalid")
  29.         _pl(4)
  30.     endlua
  31.