?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     org     0x1234          ; eol comment belong to ORG
  2.     lua allpass ; machine code needs to be emitted in *every* pass (and the same one)
  3.         sj.parse_code("")    -- try without EOL comment first
  4.         sj.parse_code(nil)    -- try without EOL comment first
  5.         sj.parse_code("rrca")    -- try without EOL comment first
  6.         sj.parse_code("rra      ; with eol comment") -- *with*
  7.         sj.parse_code("cpl")     -- *without*
  8.         _pc("inc bc")
  9.         _pc("inc de      ; with eol comment 2")
  10.         _pc("inc hl")
  11.         -- errors
  12.         sj.parse_code("label:")
  13.         _pc("label:")
  14.         sj.parse_code("unknown")
  15.         _pc("unknown")
  16.     endlua
  17.     lua         ; [pass default] == pass3 - this is not good for ASM parsing lines!
  18.         sj.parse_code("")    -- try without EOL comment first
  19.         sj.parse_code(nil)    -- try without EOL comment first
  20.         sj.parse_code("rrca")    -- try without EOL comment first
  21.         sj.parse_code("rra      ; with eol comment") -- *with*
  22.         sj.parse_code("cpl")     -- *without*
  23.         _pc("inc bc")
  24.         _pc("inc de      ; with eol comment 2")
  25.         _pc("inc hl")
  26.         -- errors
  27.         sj.parse_code("label:")
  28.         _pc("label:")
  29.         sj.parse_code("unknown")
  30.         _pc("unknown")
  31.     endlua
  32.     lua pass1   ; pass1 this is also insufficient to generate valid machine code
  33.         sj.parse_code("")    -- try without EOL comment first
  34.         sj.parse_code(nil)    -- try without EOL comment first
  35.         sj.parse_code("rrca")    -- try without EOL comment first
  36.         sj.parse_code("rra      ; with eol comment") -- *with*
  37.         sj.parse_code("cpl")     -- *without*
  38.         _pc("inc bc")
  39.         _pc("inc de      ; with eol comment 2")
  40.         _pc("inc hl")
  41.         -- errors (but silent, because they are PASS3 type)
  42.         sj.parse_code("label:")
  43.         _pc("label:")
  44.         sj.parse_code("unknown")
  45.         _pc("unknown")
  46.     endlua
  47.