?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     ; all of these should fail on i8080
  2.  
  3.     ;;; generate shift instructions: #DDCBFF00 .. #DDCBFF3F ("ix-1" = FF index byte)
  4.     DEFARRAY instructions rlc, rrc, rl, rr, sla, sra, sli, srl
  5.     DEFARRAY registers <(ix-1),b>, <(ix-1),c>, <(ix-1),d>, <(ix-1),e>, <(ix-1),h>, <(ix-1),l>, <(ix-1)>, <(ix-1),a>
  6.  
  7. INS_I=0
  8.     DUP 8
  9. REG_I=0
  10.         DUP 8
  11.             instructions[INS_I] registers[REG_I]
  12. REG_I=REG_I+1
  13.         EDUP
  14. INS_I=INS_I+1
  15.     EDUP
  16.  
  17.     ;;; generate `bit` instructions: #DDCBFF46 .. #DDCBFF7E (two: {#x6, #xE})
  18. REG_BIT=0
  19.     DUP 8
  20.         bit REG_BIT,(ix-1)
  21. REG_BIT=REG_BIT+1
  22.     EDUP
  23.  
  24.     ;;; generate `res` + `set` instructions: #DDCB1180 .. #DDCB11FF ("ix+17" = 11 index byte)
  25.     DEFARRAY instructions2 res, set
  26.     DEFARRAY registers2 <(ix+17),b>, <(ix+17),c>, <(ix+17),d>, <(ix+17),e>, <(ix+17),h>, <(ix+17),l>, <(ix+17)>, <(ix+17),a>
  27.  
  28. INS_I=0
  29.     DUP 2
  30. REG_BIT=0
  31.         DUP 8
  32. REG_I=0
  33.             DUP 8
  34.                 instructions2[INS_I] REG_BIT,registers2[REG_I]
  35. REG_I=REG_I+1
  36.             EDUP
  37. REG_BIT=REG_BIT+1
  38.         EDUP
  39. INS_I=INS_I+1
  40.     EDUP
  41.