1 00:00:00,450 --> 00:00:07,500 So in this know, we are going to talk about our system calls solar system Kasprowicz and travels to 2 00:00:07,500 --> 00:00:13,680 the operating system services, so if there is any service provided by the operating system to open 3 00:00:13,680 --> 00:00:18,510 a file or open an image, you can call that service. 4 00:00:18,510 --> 00:00:20,670 You can use that service using the system. 5 00:00:21,870 --> 00:00:26,900 So in summary, we have to use the system called numbers in order to call that system call. 6 00:00:27,240 --> 00:00:32,760 So each system can't have a specific number like unique number. 7 00:00:33,180 --> 00:00:37,010 You need to use that number to call the system call. 8 00:00:37,890 --> 00:00:39,330 So some other system calls. 9 00:00:39,330 --> 00:00:41,810 Exemplary examples are right. 10 00:00:41,850 --> 00:00:42,270 Open. 11 00:00:42,270 --> 00:00:44,570 Close, right. 12 00:00:45,540 --> 00:00:46,020 Right. 13 00:00:46,140 --> 00:00:54,090 The data into the specified destination and open function opens you, Shankar Wolfenson, file out an 14 00:00:54,090 --> 00:00:59,460 image and system just closes the pointer. 15 00:01:00,920 --> 00:01:11,360 And we need to send the arguments to the system cause to modify our design, file our own image, and 16 00:01:11,540 --> 00:01:16,940 the parts should be sent as an argument, should be Sandison arguments, and these arguments should 17 00:01:16,940 --> 00:01:18,520 be placed in the registers. 18 00:01:19,370 --> 00:01:21,970 OK, up to now, you may seem confusing. 19 00:01:22,400 --> 00:01:30,520 Now, let me tell the Linux system CARTERVILLE So this is taken from Sharon Stone website. 20 00:01:31,490 --> 00:01:39,380 And here you have you will see the so many system calls a system called for right open and so on. 21 00:01:40,360 --> 00:01:48,100 And one of the important thing is if you have a program, Lindsay, you can just import the hydrofoil 22 00:01:48,250 --> 00:01:50,980 related to this system and you can just. 23 00:01:52,300 --> 00:01:55,600 Use this system as a normal functions. 24 00:01:56,600 --> 00:02:02,540 So if you have to, the file handling in the C programming language can see right, open, close. 25 00:02:03,410 --> 00:02:05,960 Yes, a normal functions, right. 26 00:02:07,370 --> 00:02:10,520 So these are the very system calls. 27 00:02:10,560 --> 00:02:14,330 You can check the website for more tramcars. 28 00:02:15,670 --> 00:02:17,590 Now we see about the right system. 29 00:02:18,790 --> 00:02:22,880 So right, right to file descriptor specified. 30 00:02:23,500 --> 00:02:25,270 OK, now let's see the syntax. 31 00:02:25,840 --> 00:02:30,840 The right system car is included in the unit study headwall. 32 00:02:31,330 --> 00:02:38,830 So if you want to use it in the C programming language, you need to write this line and then you can 33 00:02:38,830 --> 00:02:39,600 use this function. 34 00:02:40,360 --> 00:02:44,410 So the return value of the write function is essay's. 35 00:02:44,410 --> 00:02:52,000 Underscore that, which is a number which returns the status of the this system, whether it's successful 36 00:02:52,000 --> 00:02:52,490 or failed. 37 00:02:53,350 --> 00:03:00,190 So the first argument is the file descriptor, whether you want to write the input output or standard 38 00:03:00,190 --> 00:03:02,080 error or to a file descriptor. 39 00:03:02,590 --> 00:03:09,460 So gyro stands for standard input and one stands for Standard Output and Pushtuns for standard error. 40 00:03:10,210 --> 00:03:13,870 You want to write some data to output, you need to specify one. 41 00:03:15,450 --> 00:03:22,880 And this points to the powerful is the actual data you want to write to this nation. 42 00:03:24,670 --> 00:03:31,120 And this is underscored the difference, the number of bites and the count actually divides the number 43 00:03:31,120 --> 00:03:34,540 of birds the size increase the number and the number of deaths. 44 00:03:35,290 --> 00:03:42,510 And this defines the number of this buffer you need to write into this file descriptor. 45 00:03:43,330 --> 00:03:45,400 So I thought you understood. 46 00:03:45,430 --> 00:03:48,450 So let me explain again with some simple words. 47 00:03:48,910 --> 00:03:56,350 So these three arguments specify where to write the data and what to read the data and how much to write 48 00:03:56,350 --> 00:03:56,890 the data. 49 00:03:58,480 --> 00:04:05,680 So if I say 50 bytes of this buffer should be placed in this file descriptor or an output. 50 00:04:06,550 --> 00:04:08,660 So this is very simple system called. 51 00:04:09,550 --> 00:04:13,450 Now let's see how to call the system using our assembly language. 52 00:04:14,950 --> 00:04:23,500 So I have it in this this syntax which we have seen in the previous right now, the right system should 53 00:04:23,500 --> 00:04:30,290 be placed for years and then this argument should be in easier. 54 00:04:30,690 --> 00:04:36,820 And if there are more than three arguments you need to place in EASA and the registers. 55 00:04:38,320 --> 00:04:45,940 All right, now we need to press the file descriptor number, which is which is an integer should be 56 00:04:45,940 --> 00:04:53,890 President Ebix, and you need to put the pointer toward Buffer in X and you need to write the number 57 00:04:53,890 --> 00:05:01,270 of bytes you want to write to and you need to put that number in index after putting all these values. 58 00:05:01,780 --> 00:05:09,590 You need to you need to write this instruction card directly to the software. 59 00:05:10,720 --> 00:05:16,070 So what this software actually does is it will enable the handler. 60 00:05:16,390 --> 00:05:22,280 So this intrapreneur will get a degree and will check the contents of the eggs. 61 00:05:22,690 --> 00:05:28,240 So since X contains the number of write, it performs right. 62 00:05:28,240 --> 00:05:31,410 Operation with this with this argument. 63 00:05:31,750 --> 00:05:42,820 And it also takes Ebix, Ishaq's and UTX and then that accordingly that this the system and intrapreneur 64 00:05:43,060 --> 00:05:46,400 will perform this system card with this argument. 65 00:05:47,590 --> 00:05:50,800 I hope we understood this, so I will repeat it again. 66 00:05:51,400 --> 00:05:59,830 We need to press the right system cause no any X and this first argument and every second argument extra 67 00:06:00,160 --> 00:06:00,710 to react. 68 00:06:00,940 --> 00:06:03,010 And we need to call this software and. 69 00:06:04,720 --> 00:06:11,050 We need to preface this by using the mourning section, do don't worry about these guys will cover all 70 00:06:11,050 --> 00:06:17,570 this in part, and then we need to find recorder in the city, 1832. 71 00:06:17,590 --> 00:06:22,270 But this is a softer interest and it will perform the system called.