Subversion Repositories Kolibri OS

Rev

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

  1. macro buttabnum a0,a1,a2,a3,a4
  2. {
  3.         test [flags],(1 shl 5)
  4.         jnz .prg
  5.         test [flags],(1 shl 3)
  6.         jnz .a1
  7. if a4
  8.         test [flags],(1 shl 4)
  9.         jnz .a4
  10. endf
  11.         test [flags],(1 shl 11)
  12.         jnz .a2
  13.         test [flags],(1 shl 12)
  14.         jnz .a3
  15.         test [flags],(1 shl 9)
  16.         jnz .prg
  17.         mov eax,a0
  18.         jmp but_table.to_opcode
  19.                 .a1:    mov eax,a1
  20.                 jmp but_table.to_opcode
  21.                 .a2:    mov eax,a2
  22.                 jmp but_table.to_opcode
  23.                 .a3:    mov eax,a3
  24.                 jmp but_table.to_opcode
  25.         .prg:
  26.         test [flags],(1 shl 8)
  27.         jz @f
  28.         add [dop8],a0
  29.         jmp but_table.dop8
  30.     @@: test [flags],(1 shl 9)
  31.         jz @f
  32.         mov al,a0
  33.         jmp but_table.dop9
  34.     @@: movzx eax,[schk]
  35.         add eax,PMEM
  36.         inc [schk]
  37.         test [flags],(1 shl 3)
  38.         jnz @f
  39.         mov byte [eax],a0
  40.         ret
  41.     @@: mov byte [eax],a1
  42.         btr [flags],3
  43.         ret
  44. if a4
  45. .a4:    mov eax,a4
  46.         jmp but_table.to_opcode
  47. endf   
  48. }