4 Replies - 578 Views - Last Post: 05 May 2018 - 07:53 AM

#1 sunshine33   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 129
  • Joined: 15-September 17

Assembly language windows 32 bit system calls ?

Posted 05 May 2018 - 07:24 AM

Quote

A system call is a special function call which changes the CPU’s privilege level to enable more capabilities

A user process cannot do privileged instructions No in or out instructions No changing of CPU mapping registers Instead a user process makes a system call The system call is a part of the kernel of the operating system It verifies that the user should be allowed to do the requested action and then does the action

In operating systems such as BSD UNIX store syscall parameters on the stack, like the 32-bit x86 function call interface.

In ancient 16-bit DOS mode, you access DOS functionality via INT 0x21, with the equivalent of a system call number in register AH.

In a PC BIOS boot block, you can access BIOS functionality via several interrupts, including INT 0x10 for screen access, or INT 0x13 for disk access.

On modern 32-bit Windows, you use the sysenter instruction, with the system call number in eax. Older pre-XP windows used interrupt 0x2E.

Programming for Win32

Win32 is the primary operating system API found in most of Microsoft’s 32-bit operating systems including Windows 9x, NT, 2000 and XP. We will follow the plan of the previous section and first look at programs that just use system calls and then programs that use a C library.

Calling the Win32 API Directly

Win32 defines thousands of functions! The code for these functions is spread out in many different dynamic libraries, but the majority of them are in KERNEL32.DLL, USER32.DLL and GDI32.DLL (which exist on all Windows installations). The interrupt to execute system calls on the x86 processor is hex 2E, with EAX containing the system call number and EDX pointing to the parameter table in memory. However, according to z0mbie, the actually system call numbers are not consistent across different operating systems, so, to write portable code you should stick to the API calls in the various system DLLs.


Where can i learn more about the Assembly language windows 32 bit system calls ?

Is This A Good Question/Topic? 0
  • +

Replies To: Assembly language windows 32 bit system calls ?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14867
  • View blog
  • Posts: 59,319
  • Joined: 12-June 08

Re: Assembly language windows 32 bit system calls ?

Posted 05 May 2018 - 07:37 AM

Also seen here.

Snag a book on the topic.
Was This Post Helpful? 0
  • +
  • -

#3 sunshine33   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 129
  • Joined: 15-September 17

Re: Assembly language windows 32 bit system calls ?

Posted 05 May 2018 - 07:41 AM

Lol , I dont like stack exchange type forums though .

Can you suggest me a good book ?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14867
  • View blog
  • Posts: 59,319
  • Joined: 12-June 08

Re: Assembly language windows 32 bit system calls ?

Posted 05 May 2018 - 07:49 AM

Per my usual suggestion - Amazon most likely would have it. My successful steps would be: search by topic, sort by release date, and start comparing well reviewed books. Once you get a few, eyeball the rest of the comments, and then compare the indexes (most of the books allow you to see the index). See what they all cover, don't cover etc. From there you should have a good handful to narrow down by price, used-book status, etc.
Was This Post Helpful? 0
  • +
  • -

#5 sunshine33   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 129
  • Joined: 15-September 17

Re: Assembly language windows 32 bit system calls ?

Posted 05 May 2018 - 07:53 AM

OK , thanks

This looks good ,

Introduction to 64 Bit Windows Assembly Programming - Ray Seyfarth
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1