Subversion Repositories Kolibri OS

Rev

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

  1. ;-----------------------------------------------------------------------------
  2. ;                           Assemble instruction event
  3. OnAsm:  mov     esi,[CurArg]
  4.         mov     edi,esi
  5.         mov     ecx,255
  6.         xor     eax,eax
  7.         repnz   scasb
  8.         stc
  9.         sbb     edi,esi
  10.         jz      .Exit
  11.         ;
  12.         mov     eax,[CPUYPos]
  13.         mov     rax,[AddrBuffer+(rax-1)*sizeof.dq]
  14.         mov     [OriginPtr],rax
  15.         mov     al,[CodeType]
  16.         mov     [code_type],al
  17.         ;
  18.         call    Assemble
  19.         or      esi,esi
  20.         jz      .Move
  21.         ;
  22. if 1
  23.         mov     ecx,MSG_WIDTH-1
  24.         mov     edi,ErrorLine
  25.         push    rdi
  26. .Loop:  lodsb
  27.         stosb
  28.         or      al,al
  29.         loopnz  .Loop
  30.         mov     [rdi-1],word 10
  31.         pop     rsi
  32.         and     byte [rsi],0xDF
  33. end if
  34.         ;
  35.         call    PutMessageNoDraw
  36.         jmp     .Exit
  37. .Move:  mov     eax,[CPUYPos]
  38.         mov     rsi,[AddrBuffer+(rax-1)*sizeof.dq]
  39.         lea     edi,[output_data]
  40.         mcall   69,7,[DebuggeePID],[output_size]
  41. .Exit:  call    PrintCmdLine
  42.         mov     [AfterKey],1
  43.         call    ShowImage
  44.         ret
  45. ;-----------------------------------------------------------------------------
  46. uglobal
  47. if used ErrorLine
  48. ErrorLine       rb MSG_WIDTH
  49. end if
  50. endg