?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     OUTPUT "op_BIT_CB.bin"
  2.  
  3.     ;;; generate shift instructions: #CB00 .. #CB3F
  4.     LUA ALLPASS
  5.         instructions = { 'rlc', 'rrc', 'rl', 'rr', 'sla', 'sra', 'sli', 'srl' }
  6.         registers = { 'b', 'c', 'd', 'e', 'h', 'l', '(hl)', 'a' }
  7.         for ii = 1, #instructions do
  8.             for rr = 1, #registers do
  9.                 instruction = instructions[ii]..' '..registers[rr]
  10.                 _pc(instruction)
  11.             end
  12.         end
  13.     ENDLUA
  14.  
  15.     ;;; generate bit-manipulation instructions: #CB40 .. #CBFF
  16.     LUA ALLPASS
  17.         instructions = { 'bit', 'res', 'set' }
  18.         registers = { 'b', 'c', 'd', 'e', 'h', 'l', '(hl)', 'a' }
  19.         for ii = 1, #instructions do
  20.             for bb = 0, 7 do
  21.                 for rr = 1, #registers do
  22.                     instruction = instructions[ii]..' '..bb..','..registers[rr]
  23.                     _pc(instruction)
  24.                 end
  25.             end
  26.         end
  27.     ENDLUA
  28.