Hi, welcome to Just Answer.
Thanks, XXXXX XXXXX like a common problem with the IAC (Idle Air Control) valve. These valves become gummed from age and cause a low idle, rough idle, and intermittant stalling. The IAC is correctly tested through a factory level scan tool, but for the cost of a new valve and the ease of replacement; I recommend you replace it along with a good cleaning of the throtle body and see if the problem still persists. Below is the procedure to replace the valve. Most auto parts stores carry these in stock as well.
An IAC valve failure commonly does not cause an actual missfire, but it can cause a hesitation or feeling of a missfire. You may have two seperate issues going on here, but I would get the IAC out of the way and see if this missfire remains. Typically an engine missfire will almost immedialty cause the check engine lamp to flash and set illuminated.
For the throtle body cleaning, you can simply purchase good throtle body cleaner (not carburator cleaner) from a local parts store. Remove the air intake duct at the throtle body and hold the throtle open. Use a rag and wet it down with cleaner. Using the wet rag swab down the inside if the throtle body and around the plate as well. Once you get the accumilated carbon off the throtle bore and throtle plate, you can rinse down the inside by spraing it. However, you want to be carefull to not use too much cleaner,it can flood the engine which leaves a chance for damaging it. You should be able to get all of the carbon buildup off, and see a very clean throtle bore. After replacing the IAC and cleaning the throtle, remove the battery cables for about 10 minutes to reset the enigne's computer idle strategy. Than fire up the engine and let it idle for about 10 minutes. If this missfire at higher rpm's remains, let me know....and we'll take it from there.
In your original question you stated that the idle speed dropped and the engine stalled. Than you restarted it and the engine idles low. Those symptoms correspond to a faulty IAC valve. An IAC can also cause it to not rev, but that is much more rare and usually sets the check engine lamp. The missfire your feeling at higher rpm's is NOT an indication of an IAC failure, however, most missfires or hesissitation on this truck will cause the check enigne lamp to flash or illuminate. I would replace the IAC first as well as clean the throtle body; and see if both problems are gone or one still exists. The MAF (Mass Airflow Sensor) on these is also a prone failure and I believe you may have a combination of a dirty MAF sensor and a faulty IAC valve...if you had access to a factory level scan tool both of those components could be tested.
Listen you said the motor stalled on you, with those symptoms...you'll eventually need an IAC valve, even one stall is not a normal condition. The engine does not rev in park, but it is NOT supposed to missfire so either you just thought it was a missfire when it reached it's rev limit, or there is an actual problem. I gave you my opinion with the symptoms you provided; take it whichever way you like.