Subversion Repositories Kolibri OS

Rev

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

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; Min ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ; Compile with FASM
  5. ; Version 0.1: Sep 25, 2018
  6.  
  7. ; Copyright (c) 2018, Efremenkov Sergey aka TheOnlyMirage
  8. ; All rights reserved.
  9. ; Redistribution and use in source and binary forms, with or without modification,
  10. ; are permitted provided that the following conditions are met:
  11. ;    * Redistributions of source code must retain the above copyright notice, this
  12. ;    list of conditions and the following disclaimer.
  13. ;    * Redistributions in binary form must reproduce the above copyright  notice,
  14. ;    this list of conditions and the following disclaimer in the documentation and/or
  15. ;    other materials provided with the distribution.
  16. ;    * Neither the name of the <organization> nor the names of its contributors may
  17. ;    be used to endorse or promote products derived from this software without
  18. ;    specific prior written permission.
  19.  
  20. ; THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  21. ; INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  22. ; PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  23. ; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  24. ; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  25. ; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. ; --------------------------------------------------------------------------------------
  27.  
  28. format binary as "" ;"kex"
  29. use32
  30. org 0x0    ; áàçîâûé àäðåñ ðàçìåùåíèÿ êîäà, âñåãäà 0x0
  31.  
  32. ; çàãîëîâîê
  33. db 'MENUET01'     ;ìàãè÷åñêèé èäåíòèôèêàòîð
  34. dd 0x01           ;âåðñèÿ
  35. dd START          ;àäðåñ òî÷êè ñòàðòà ïðîãðàììû
  36. dd I_END          ;àäðåñ êîíöà, ïî ôàêòó ðàçìåð ôàéëà ïðîãðàììû
  37. dd 0x40           ;òðåáóåìîå êîë-âî ïàìÿòè äëÿ çàãðóçêè ïðîãðàììû
  38. dd 0              ;íà÷àëüíîå çíà÷åíèå ðåãèñòðà esp - àäðåñ êîíöà îáëàñòè ñòýêà òàê êàê ñòýê ðàñòåò â ñòîðîíó ìåíüøèõ àäðåñîâ
  39. dd 0, 0           ;àäðåñ ñòðîêè ïàðàìåòðîâ è àäðåñ ñòðîêè ïóòè èñïîëíÿåìîãî ôàéëà
  40.  
  41.  
  42. START:
  43. mov eax, 18
  44. mov ebx, 23
  45. int 0x40
  46. mov eax, -1
  47. int 0x40
  48.  
  49. I_END:
  50.