Guest User

Untitled

a guest
Jan 14th, 2015
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Variante 1 mit eigentlich unnötigen Casts (funktioniert):
  2.  
  3.  
  4. ;vfs.c:253: int16_t vfs_create_process_from_memory(uint8_t p1, uint8_t p2, uint8_t p3, void* entry_point, void* sp) {
  5. ;   ---------------------------------
  6. ; Function vfs_create_process_from_memory
  7. ; ---------------------------------
  8. _vfs_create_process_from_memory_start::
  9. _vfs_create_process_from_memory:
  10.     push    ix
  11.     ld  ix,#0
  12.     add ix,sp
  13. ;vfs.c:254: return (int16_t)modsys_invoke(vfs_module_number, VFS_INTFUNC_CREATETASK_MEM, NULL, (uint8_t)p1, (uint8_t)p2, (uint8_t)p3, (void*)entry_point, (void*)sp);
  14.     ld  l,9 (ix)
  15.     ld  h,10 (ix)
  16.     push    hl
  17.     ld  l,7 (ix)
  18.     ld  h,8 (ix)
  19.     push    hl
  20.     ld  h,6 (ix)
  21.     ld  l,5 (ix)
  22.     push    hl
  23.     ld  a,4 (ix)
  24.     push    af
  25.     inc sp
  26.     ld  hl,#0x0000
  27.     push    hl
  28.     ld  a,#0x01
  29.     push    af
  30.     inc sp
  31.     ld  a,(_vfs_module_number)
  32.     push    af
  33.     inc sp
  34.     call    _modsys_invoke
  35.     ld  iy,#0x000B
  36.     add iy,sp
  37.     ld  sp,iy
  38.     pop ix
  39.     ret
  40. _vfs_create_process_from_memory_end::
  41.  
  42.  
  43.  
  44.  
  45.  
  46. Variante 2 ohne Casts:
  47.  
  48. ;vfs.c:253: int16_t vfs_create_process_from_memory(uint8_t p1, uint8_t p2, uint8_t p3, void* entry_point, void* sp) {
  49. ;   ---------------------------------
  50. ; Function vfs_create_process_from_memory
  51. ; ---------------------------------
  52. _vfs_create_process_from_memory_start::
  53. _vfs_create_process_from_memory:
  54.     push    ix
  55.     ld  ix,#0
  56.     add ix,sp
  57.     push    af
  58. ;vfs.c:255: return (int16_t)modsys_invoke(vfs_module_number, VFS_INTFUNC_CREATETASK_MEM, NULL, p1, p2, p3, entry_point, sp);
  59.     ld  e,6 (ix)
  60.     ld  d,#0x00
  61.     ld  a,5 (ix)
  62.     ld  -2 (ix),a
  63.     ld  -1 (ix),#0x00
  64.     ld  l,4 (ix)
  65.     ld  h,#0x00
  66.     ld  c,9 (ix)
  67.     ld  b,10 (ix)
  68.     push    bc
  69.     ld  c,7 (ix)
  70.     ld  b,8 (ix)
  71.     push    bc
  72.     push    de
  73.     ld  c,-2 (ix)
  74.     ld  b,-1 (ix)
  75.     push    bc
  76.     push    hl
  77.     ld  hl,#0x0000
  78.     push    hl
  79.     ld  a,#0x01
  80.     push    af
  81.     inc sp
  82.     ld  a,(_vfs_module_number)
  83.     push    af
  84.     inc sp
  85.     call    _modsys_invoke
  86.     ld  iy,#0x000E
  87.     add iy,sp
  88.     ld  sp,iy
  89.     pop af
  90.     pop ix
  91.     ret
  92. _vfs_create_process_from_memory_end::
Advertisement
Add Comment
Please, Sign In to add comment