Subversion Repositories Kolibri OS

Rev

Rev 1098 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. macro use_label
  2. {
  3. draw_label:
  4. pusha
  5.         xor     esi,esi
  6.         mov     edx,[edi+8]
  7. .check_next:
  8.         mov     ah,[edx+esi]
  9.         inc     esi
  10.         test    ah,ah
  11.         jz      @f
  12.         jmp     .check_next
  13. @@:
  14.         mov     eax,4
  15.         mov     ebx,[edi]
  16.         mov     ecx,[edi+4]
  17.         int     0x40
  18. popa
  19. ret
  20. }
  21.  
  22. struc label left,top,color,text
  23. {
  24. .top: dw top ; +0
  25. .left: dw left ; +2
  26. .color: dd color; +4
  27. .text: dd text  ; +8
  28. }
  29.  
  30. l_struc_size=12
  31. macro draw_labels start,end
  32. {
  33.         mov     edi,start
  34.         mov     ecx,((end-start)/l_struc_size)
  35. @@:
  36.         call    draw_label
  37.         add     edi,l_struc_size
  38.         loop    @r
  39. }
  40.  
  41. macro labels_set_sys_color start,end,color_table
  42. {
  43.         mov     edi,start
  44.         mov     ecx,((end-start)/l_struc_size)
  45.         mov     esi,color_table
  46. @@:
  47.         push    dword [esi+32]
  48.         pop     dword [edi+4]
  49.         add     edi,l_struc_size
  50.         loop    @r
  51. }