Advertisement
Guest User

SizeOf BlitzMax (Array)

a guest
Jan 2nd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     format  ELF
  2.     extrn   __bb_basic_basic
  3.     extrn   __bb_blitz_blitz
  4.     extrn   bbEmptyArray
  5.     extrn   bbNullObject
  6.     extrn   bbStringClass
  7.     extrn   bbStringConcat
  8.     extrn   bbStringFromInt
  9.     extrn   brl_filesystem_LoadDir
  10.     extrn   brl_standardio_Print
  11.     public  _bb_main
  12.     public  bb_files
  13.     section "code" executable
  14. _bb_main:
  15.     push    ebp
  16.     mov ebp,esp
  17.     sub esp,12
  18.     push    ebx
  19.     push    esi
  20.     push    edi
  21.     cmp dword [_20],0
  22.     je  _21
  23.     mov eax,0
  24.     pop edi
  25.     pop esi
  26.     pop ebx
  27.     mov esp,ebp
  28.     pop ebp
  29.     ret
  30. _21:
  31.     mov dword [_20],1
  32.     mov dword [ebp-8],0
  33.     mov dword [ebp-4],0
  34.     call    __bb_blitz_blitz
  35.     call    __bb_basic_basic
  36.     mov eax,dword [_11]
  37.     and eax,1
  38.     cmp eax,0
  39.     jne _12
  40.     push    1
  41.     push    _3
  42.     call    brl_filesystem_LoadDir
  43.     add esp,8
  44.     inc dword [eax+4]
  45.     mov dword [bb_files],eax
  46.     or  dword [_11],1
  47. _12:
  48.     mov edi,dword [bb_files]
  49.     mov eax,edi
  50.     add eax,24
  51.     mov ebx,eax
  52.     mov eax,ebx
  53.     add eax,dword [edi+16]
  54.     mov dword [ebp-12],eax
  55.     jmp _4
  56. _6:
  57.     mov esi,dword [ebx]
  58.     add ebx,4
  59.     cmp esi,bbNullObject
  60.     je  _4
  61.     push    esi
  62.     call    brl_standardio_Print
  63.     add esp,4
  64.     mov eax,dword [esi+8]
  65.     add dword [ebp-8],eax
  66.     add dword [ebp-4],1
  67. _4:
  68.     cmp ebx,dword [ebp-12]
  69.     jne _6
  70. _5:
  71.     push    dword [ebp-4]
  72.     call    bbStringFromInt
  73.     add esp,4
  74.     push    eax
  75.     push    _7
  76.     push    dword [ebp-8]
  77.     call    bbStringFromInt
  78.     add esp,4
  79.     push    eax
  80.     push    _7
  81.     mov eax,dword [bb_files]
  82.     push    dword [eax+16]
  83.     call    bbStringFromInt
  84.     add esp,4
  85.     push    eax
  86.     call    bbStringConcat
  87.     add esp,8
  88.     push    eax
  89.     call    bbStringConcat
  90.     add esp,8
  91.     push    eax
  92.     call    bbStringConcat
  93.     add esp,8
  94.     push    eax
  95.     call    bbStringConcat
  96.     add esp,8
  97.     push    eax
  98.     call    brl_standardio_Print
  99.     add esp,4
  100.     mov eax,0
  101.     jmp _8
  102. _8:
  103.     pop edi
  104.     pop esi
  105.     pop ebx
  106.     mov esp,ebp
  107.     pop ebp
  108.     ret
  109.     section "data" writeable align 8
  110.     align   4
  111. _20:
  112.     dd  0
  113.     align   4
  114. _11:
  115.     dd  0
  116.     align   4
  117. _3:
  118.     dd  bbStringClass
  119.     dd  2147483647
  120.     dd  11
  121.     dw  99,58,92,119,105,110,100,111,119,115,92
  122.     align   4
  123. bb_files:
  124.     dd  bbEmptyArray
  125.     align   4
  126. _7:
  127.     dd  bbStringClass
  128.     dd  2147483647
  129.     dd  2
  130.     dw  32,32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement