Hussein
Hello everyone i want to ask a question, I know maybe it’s not meaningfull for this group but, i have some doubts. Do I need to graduated from software engineering field to do software project? Associate degree is not enough?
a degree in software engineering is a proof that you know the basics (depending on where you live and who do you work for, some people ignore it) in the contrary not only working on software projects doesn’t require a degree, it gives you the experience you need which is a thing that you would never learn in universities
André
Because i understanded that i cant use syscalls
if you have no OS you don't have syscalls, i noticed you mentioneed BIOS early, without the OS what you have are "BIOS Interrupt Calls" if you want to learn how to make one maybe look into coreboot and it's documentation
André
Where is the micro controller
i assumed you were working with one, apparently you're not
Hussein
it means that it is an address of a function
Hussein
you can use int or char instead of void
Hussein
(void (*)(int)) is for type casting and void (*myfunc)(int a) is to declare a pointer that points to a function from the same type
Hussein
int (*f1)(int a, int b) will declare a pointer used to point to a function that returns an integer
Hussein
don’t you have the header file of that library?
Hussein
do you know what does that function do?
Anonymous
Hi guys , i have a question could anyone could help me to get that one answer?
Anonymous
Write a program in Javascript (or any other programming language of your choice, or even pseudocode) 1. Write a function called do_allocation(number_of_people, number_of_buses) 2. The function should return a list of number of people who can get into the next bus that comes in based on the following logic: 3. Each bus's capacity is the sum of the capacities of the previous two buses. 4. Once all the people get in, then the buses can continue, but will have 0 people inside it. -This is the case when the number of people are less and there are more buses. So after all the people are already boarded, then the remaining buses will have 0 people boarding. 5. The output of the function is an array/list with the same length as number_of_buses. 6. The total of this output array/list should be less than or equal to the number of people. 7. The first bus' capacity can be set to 1 by default. E.g. Def do_allocation(number_of_people, number_of_buses): .... Your code.... Return array[number of people got into first bus, number of people got into second bus,.... number of people who got into last bus]
Anonymous
I am new here
Anonymous
This is the question i am looking for solving It's something related to fabunaci
Anonymous
C++ is good , i can understand it I can't understand the logic
Anonymous
Like if anyone could tell me it's logic how to solve it
Anonymous
😩😩 tried everything, i am very new to programming and couldn't get anything
Hussein
Like if anyone could tell me it's logic how to solve it
yeah there are tons of resources that might help you better than we might do and save you some time
Anonymous
😩😩
André
Because someone decided that would be their name
Hussein
😩😩
make list that include the capacity of the first two buses declare a function that take the list and a counter (to keep track of the next available index in the list) as parameters the functoin should append the sum of the previous two elements to the list call it as many times as you want l, no problem
Hussein
also you should increment the counter at the end of the function
the value in the last element in the arraylist is the capacity of the next available bus
Hussein
Why they are called interrupt calls
because they rudely interupt the operating system or bios from doing their jobs 😜
Hussein
Hi do you know what is the message bus
a way to send signals between two programs running at the same time
/
because they rudely interupt the operating system or bios from doing their jobs 😜
But when you call the interrupt instruction the rest of the things stop
/
a way to send signals between two programs running at the same time
Can it be like from the java code to the c code
Hussein
But when you call the interrupt instruction the rest of the things stop
with functions calls the process or program you are running will execute the instructions in that function but with interupts you are sending a request to the operating system (or bios) to do some thing and the bios or the OS will do it for you
Hussein
Can it be like from the java code to the c code
basically it is a way for any two processes communicate with each other
/
basically it is a way for any two processes communicate with each other
Yes in that app there is the dex that communicates with the so file for example
Sleeves
So I responded to one of the folks looking for programmers on here. Came to an agreement about a project, got started , worked on it for a week and sent a report as discussed. Now he has gone awol. Advice is to shun anyone asking for programmers here
Hussein
And if it is only one instruction how you tell what to do
in x86 assembly it is: int [some specific code]
Hussein
I think you have to use: ASM{ int $[bios code] }
Hussein
And what is bios code
it is more like an id for the task that you want the bios to perform for your program you can read about bios routines and interupt calls here in the interupt table section: https://en.m.wikipedia.org/wiki/BIOS_interrupt_call
The
How to use malloc in c programming?
fan
How to use malloc in c programming?
#include <stdlib.h> void* malloc(int size);
fan
you will get a size of memory place in heap by the return pointer.
fan
and if you don't use it, please use free(void* ptr) to free it to OS.
Hussein
It is like a syscall
a system call is a interupt for the OS there is litterally no difference execpt that bios and different OSes uses different codes and registers
Hussein
But is the syscall implement in a library
yes also in assembly there is a pseudo-instruction called syscall but it is actually an interupt behind the hood with C you can make system calls but I don’t think this work on bios because in 32-bit protected mode bios interupts are not accessible note that C only support 32-bit protected mode not 16-bit real mode
Hussein
Why in the bios you can use only 16 bit registers
because you haven’t switched to 32-bit protected mode
Hussein
Why protected
because each program runs on your machine won’t share memory with other programs or the operating system so it protects your memory and separate it
Hussein
And in what library are syscalls implemented
#include <sys/syscall.h> then you can use syscall() function
/
#include <sys/syscall.h> then you can use syscall() function
i mean the open call for example in what so file is implemented
Hussein
linux
android is a modified linux fork so I’m not really sure you might wanna check something called libc that is used for android you can look that up on google
Hussein
do you know what is a pipeline
what kind of pipeline do you mean?
/
what kind of pipeline do you mean?
one in the the app i was seeing
/
there is a thing called pipeline in the so file
Hussein
I geuss it means interprocess communication where two processes can communicate as I told you earlier
Hussein
But you are not sure
well pipelines might refer to many stuffs but usually it’s interprocess communications
Michel
What does const -> size_t mean after a member function declaration?
Blyncnov
Hello , I'm new here
Blyncnov
Can anyone help me through, I am new to c++ and I have been trying to download a ide , visual studio, but I can only see 2022 version is only .net related
Blyncnov
Any other choice except Vscode ?
Anonymous
hi