My friends, I've always done some amateur projects using microcontrollers from the ATmega and PIC16F families using assembly language, but now I'm doing some things in the Arduino IDE and working with the C++ and C languages in addition to the language known as Wiring.
I believe that there are people who have already faced the same problem that I'm experiencing coming from the assembly language.
It feels like I'm not in control when I'm not programming in assembly.
I'll give you an example, when we put the delay() function; I have no idea if it uses a timer for its execution and I'm afraid to create a routine that uses a timer, thinking that I might cause an error. The same goes for the millis() function; or when I use a pwm function.
Has anyone experienced this feeling of not being in control and how to overcome it?
I think you are confusing 2 different things as being the same. The Arduino platform comes with lots of built in functions designed to make life easier for absolute beginners, delay being one of them. These functions are not part of C or C++. There is nothing to say you have to use any of them, use as you please. Study the datasheet of the processor you are interested in and learn how to program its registers to do what you want it to do.
I took the path from PIC programmed in assembly to PIC programmed in C to Arduino using C and C++.
You can add assembly code as inlines in C++ if you have too. Usually you don't have too if you think about it a bit. I have written only a few lines of inline assembler in the last decade.
I have written thousands of lines of assembler code for multiple processors over the last decades. I don't miss it a bit, C and C++ are much easier. Modern compilers can usually do a better job.
It feels like that because you are not in control anymore. There is stuff you can do in assembler that can't be done in any high level language. Even though C is not considered to be particularly high.
You have new stuff to learn. It depends on what you mean by an error. In machine code there are no errors, but once an interpreter or compiler is involved you can get errors.
There is a background task built into Arduino code, not C itself, which keeps track of time and maintains the millis and micros counter. It is implemented on the hardware Timer0. So basically don't mess with that unless you know what you are doing. The result is that there is always a jitter on any pin action, caused by this background task. But that is a small price to pay, and if it is too much you can always disable the timer from generating any interrupts.
So if you know enough you can wrestle back some control, but not all if it, like you could where it was up to you to control the return stack. That allowed you to do lots of tricks like having two entry points to a function with a single return address.
So much fun but time moves on and with a language like C you can write none trivial code that works first time.
if you're like me, you loved the Apple II reference manual which listed the assembly code in it ROM with comments.
you can find the code for the basic Arduino stuff in the same directory where Arduino.h resides (i.e. find cmd). delay() is in wiring.c. that directory on my laptop