text:
Nicotine

Nicotine is a naturally produced alkaloid in the nightshade family of plants (most predominantly in tobacco and Duboisia hopwoodii) and is widely used recreationally as a stimulant and anxiolytic. As a pharmaceutical drug, it is used for smoking cessation to relieve withdrawal symptoms. Nicotine acts as a receptor agonist at most nicotinic acetylcholine receptors (nAChRs), except at two nicotinic receptor subunits (nAChRα9 and nAChRα10) where it acts as a receptor antagonist.

Nicotine constitutes approximately 0.6–3.0% of the dry weight of tobacco. Nicotine is also present at ppb-concentrations in edible plants in the family Solanaceae, including potatoes, tomatoes, and eggplants, though sources disagree on whether this has any biological significance to human consumers. It functions as an antiherbivore toxin; consequently, nicotine was widely used as an insecticide in the past, and neonicotinoids (structurally similar to nicotine), such as imidacloprid, are some of the most effective and widely used insecticides.

Nicotine is highly addictive. Slow-release forms (gums and patches, when used correctly) can be less addictive and help in quitting. Animal research suggests that monoamine oxidase inhibitors present in tobacco smoke may enhance nicotine's addictive properties. An average cigarette yields about 2 mg of absorbed nicotine. The estimated lower dose limit for fatal outcomes is 500–1,000 mg of ingested nicotine for an adult (6.5–13 mg/kg). Nicotine addiction involves drug-reinforced behavior, compulsive use, and relapse following abstinence. Nicotine dependence involves tolerance, sensitization, physical dependence, psychological dependence, and can cause distress. Nicotine withdrawal symptoms include depressed mood, stress, anxiety, irritability, difficulty concentrating, and sleep disturbances. Mild nicotine withdrawal symptoms are measurable in unrestricted smokers, who experience normal moods only as their blood nicotine levels peak, with each cigarette. On quitting, withdrawal symptoms worsen sharply, then gradually improve to a normal state.

Nicotine use as a tool for quitting smoking has a good safety history. Animal studies suggest that nicotine may adversely affect cognitive development in adolescence, but the relevance of these findings to human brain development is disputed. At low amounts, it has a mild analgesic effect. According to the International Agency for Research on Cancer, "nicotine is not generally considered to be a carcinogen." The Surgeon General of the United States indicates that evidence is inadequate to infer the presence or absence of a causal relationship between exposure to nicotine and risk for cancer. Nicotine has been shown to produce birth defects in humans and is considered a teratogen. The median lethal dose of nicotine in humans is unknown. High doses are known to cause nicotine poisoning, organ failure, and death through paralysis of respiratory muscles, though serious or fatal overdoses are rare.

Medical

The primary therapeutic use of nicotine is treating nicotine dependence to eliminate smoking and the damage it does to health. Controlled levels of nicotine are given to patients through gums, dermal patches, lozenges, inhalers, or nasal sprays to wean them off their dependence. A 2018 Cochrane Collaboration review found high-quality evidence that all current forms of nicotine replacement therapy (gum, patch, lozenges, inhaler, and nasal spray) increase the chances of successfully quitting smoking by 50–60%, regardless of setting.

Combining nicotine patch use with a faster acting nicotine replacement, like gum or spray, improves the odds of treatment success.

Nicotine is being researched in clinical trials for possible benefit in treating Parkinson's disease, dementia, ADHD, depression and sarcoma.

In contrast to recreational nicotine products, which have been designed to maximize the likelihood of addiction, nicotine replacement products (NRTs) are designed to minimize addictiveness. The more quickly a dose of nicotine is delivered and absorbed, the higher the addiction risk.

Pesticide
Nicotine has been used as an insecticide since at least 1690, in the form of tobacco extracts (although other components of tobacco also seem to have pesticide effects). Nicotine pesticides have not been commercially available in the US since 2014, homemade pesticides are banned on organic crops, and caution is recommended for small gardeners. Nicotine pesticides have been banned in the EU since 2009. Foods are imported from countries in which nicotine pesticides are allowed, such as China, but foods may not exceed maximum nicotine levels. Neonicotinoids, such as imidacloprid, which are derived from and structurally similar to nicotine, are widely used as agricultural and veterinary pesticides as of 2016.

Performance
Nicotine-containing products are sometimes used for the performance-enhancing effects of nicotine on cognition. A 2010 meta-analysis of 41 double-blind, placebo-controlled studies concluded that nicotine or smoking had significant positive effects on aspects of fine motor abilities, alerting and orienting attention, and episodic and working memory. A 2015 review noted that stimulation of the α4β2 nicotinic receptor is responsible for certain improvements in attentional performance; among the nicotinic receptor subtypes, nicotine has the highest binding affinity at the α4β2 receptor (ki=1 nM), which is also the biological target that mediates nicotine's addictive properties. Nicotine has potential beneficial effects, but it also has paradoxical effects, which may be due to the inverted U-shape of the dose-response curve or pharmacokinetic features.

Recreational
Nicotine is used as a recreational drug. It is widely used, highly addictive and hard to discontinue. Nicotine is often used compulsively, and dependence can develop within days. Recreational drug users commonly use nicotine for its mood-altering effects. Recreational nicotine products include chewing tobacco, cigars, cigarettes, e-cigarettes, snuff, pipe tobacco, snus, and nicotine pouches.

Alcohol infused with nicotine is called nicotini.

Contraindications
Nicotine use for tobacco cessation has few contraindications.

It is not known whether nicotine replacement therapy is effective for smoking cessation in adolescents, as of 2014. It is therefore not recommended to adolescents. It is not safe to use nicotine during pregnancy or breastfeeding, although it is safer than smoking. The desirability of NRT use in pregnancy is therefore debated.

Randomized trials and observational studies of nicotine replacement therapy in cardiovascular patients show no increase in adverse cardiovascular events compared to those treated with placebo. Using nicotine products during cancer treatment may be contraindicated, as nicotine may promote tumour growth, but temporary use of NRTs to quit smoking may be advised for harm reduction.

Nicotine gum is contraindicated in individuals with temporomandibular joint disease. People with chronic nasal disorders and severe reactive airway disease require additional precautions when using nicotine nasal sprays. Nicotine in any form is contraindicated in individuals with a known hypersensitivity to nicotine.

Adverse effects
Nicotine is classified as a poison. However, at doses used by consumers, it presents little if any immediate hazard to the user. A 2018 Cochrane Collaboration review lists nine main adverse events related to nicotine replacement therapy: headache, dizziness/light-headedness, nausea/vomiting, gastro-intestinal symptoms, sleep/dream problems, non-ischemic palpitations and chest pain, skin reactions, oral/nasal reactions and hiccups. Many of these were also common in the placebo group without nicotine. Palpitations and chest pain were deemed "rare" and there was no evidence of an increased number of serious cardiac problems compared to the placebo group, even in people with established cardiac disease. The common side effects from nicotine exposure are listed in the table below. Serious adverse events due to the use of nicotine replacement therapy are extremely rare. At low amounts, it has a mild analgesic effect. At sufficiently high doses, nicotine may result in nausea, vomiting, diarrhea, salivation, bradyarrhythmia, and possibly seizures, hypoventilation, and death.

Sleep
Nicotine reduces the amount of rapid eye movement (REM) sleep, slow-wave sleep (SWS), and total sleep time in healthy nonsmokers given nicotine via a transdermal patch, and the reduction is dose-dependent. Acute nicotine intoxication has been found to significantly reduce total sleep time and increase REM latency, sleep onset latency, and non-rapid eye movement (NREM) stage 2 sleep time. Depressive non-smokers experience mood and sleep improvements under nicotine administration; however, subsequent nicotine withdrawal has a negative effect on both mood and sleep.

Cardiovascular system
A 2018 Cochrane review found that, in rare cases, nicotine replacement therapy can cause non-ischemic chest pain (i.e., chest pain that is unrelated to a heart attack) and heart palpitations, but does not increase the incidence of serious cardiac adverse events (i.e., myocardial infarction, stroke, and cardiac death) relative to controls.

A 2016 review of the cardiovascular toxicity of nicotine concluded, "Based on current knowledge, we believe that the cardiovascular risks of nicotine from e-cigarette use in people without cardiovascular disease are quite low. We have concerns that nicotine from e-cigarettes could pose some risk for users with cardiovascular disease."

Blood pressure
In the short term, nicotine causes a transient increase in blood pressure. Long term, epidemiological studies generally show increased blood pressure and hypertension among nicotine users.

Reinforcement disorders
Nicotine is highly addictive but paradoxically has quite weak reinforcing property compared to other drugs of abuse in various animals. Its addictiveness depends on how it is administered and also depends upon form in which nicotine is used. Animal research suggests that monoamine oxidase inhibitors, acetaldehyde and other constituents in tobacco smoke may enhance its addictiveness. Nicotine dependence involves aspects of both psychological dependence and physical dependence, since discontinuation of extended use has been shown to produce both affective (e.g., anxiety, irritability, craving, anhedonia) and somatic (mild motor dysfunctions such as tremor) withdrawal symptoms. Withdrawal symptoms peak in one to three days and can persist for several weeks. Some people experience symptoms for 6 months or longer.

Normal between-cigarettes discontinuation, in unrestricted smokers, causes mild but measurable nicotine withdrawal symptoms. These include mildly worse mood, stress, anxiety, cognition, and sleep, all of which briefly return to normal with the next cigarette. Smokers have a worse mood than they typically would have if they were not nicotine-dependent; they experience normal moods only immediately after smoking. Nicotine dependence is associated with poor sleep quality and shorter sleep duration among smokers.

In dependent smokers, withdrawal causes impairments in memory and attention, and smoking during withdrawal returns these cognitive abilities to pre-withdrawal levels. The temporarily increased cognitive levels of smokers after inhaling smoke are offset by periods of cognitive decline during nicotine withdrawal. Therefore, the overall daily cognitive levels of smokers and non-smokers are roughly similar.

Nicotine activates the mesolimbic pathway and induces long-term ΔFosB expression (i.e., produces phosphorylated ΔFosB isoforms) in the nucleus accumbens when inhaled or injected frequently or at high doses, but not necessarily when ingested.  Consequently, high daily exposure (possibly excluding oral route) to nicotine can cause ΔFosB overexpression in the nucleus accumbens, resulting in nicotine addiction.

Cancer
Contrary to popular belief, nicotine itself does not cause cancer in humans, although it is unclear whether it functions as a tumor promoter. A 2018 report by the US National Academies of Sciences, Engineering, and Medicine concludes, "[w]hile it is biologically plausible that nicotine can act as a tumor promoter, the existing body of evidence indicates this is unlikely to translate into increased risk of human cancer."

Low levels of nicotine stimulate cell proliferation, while high levels are cytotoxic. Nicotine increases cholinergic signaling and adrenergic signaling in colon cancer cells, thereby impeding apoptosis (programmed cell death), promoting tumor growth, and activating growth factors and cellular mitogenic factors such as 5-lipoxygenase (5-LOX), and epidermal growth factor (EGF). Nicotine also promotes cancer growth by stimulating angiogenesis and neovascularization. Nicotine promotes lung cancer development and accelerates its proliferation, angiogenesis, migration, invasion and epithelial–mesenchymal transition (EMT), via its influence on nAChRs receptors, whose presence has been confirmed in lung cancer cells. In cancer cells, nicotine promotes the epithelial–mesenchymal transition which makes the cancer cells more resistant to drugs that treat cancer.

Nicotine in tobacco can form carcinogenic tobacco-specific nitrosamines through a nitrosation reaction. This occurs mostly in the curing and processing of tobacco. However, nicotine in the mouth and stomach can react to form N-nitrosonornicotine, a known type 1 carcinogen, suggesting that consumption of non-tobacco forms of nicotine may still play a role in carcinogenesis.

Genotoxicity
Nicotine causes DNA damage in several types of human cells as judged by assays for genotoxicity such as the comet assay, cytokinesis-block micronucleus test and chromosome aberrations test. In humans, this damage can happen in primary parotid gland cells, lymphocytes, and respiratory tract cells.

Pregnancy and breastfeeding
Nicotine has been shown to produce birth defects in some animal species, but not others; consequently, it is considered to be a possible teratogen in humans. In animal studies that resulted in birth defects, researchers found that nicotine negatively affects fetal brain development and pregnancy outcomes; the negative effects on early brain development are associated with abnormalities in brain metabolism and neurotransmitter system function. Nicotine crosses the placenta and is found in the breast milk of mothers who smoke as well as mothers who inhale passive smoke.

Nicotine exposure in utero is responsible for several complications of pregnancy and birth: pregnant women who smoke are at greater risk for both miscarriage and stillbirth and infants exposed to nicotine in utero tend to have lower birth weights. A McMaster University research group observed in 2010 that rats exposed to nicotine in the womb (via parenteral infusion) later in life had conditions including type 2 diabetes, obesity, hypertension, neurobehavioral defects, respiratory dysfunction, and infertility.

Overdose
It is unlikely that a person would overdose on nicotine through smoking alone. The US Food and Drug Administration (FDA) stated in 2013 that there are no significant safety concerns associated with the use of more than one form of over-the-counter (OTC) nicotine replacement therapy at the same time, or using OTC NRT at the same time as another nicotine-containing product, like cigarettes. The median lethal dose of nicotine in humans is unknown. Nevertheless, nicotine has a relatively high toxicity in comparison to many other alkaloids such as caffeine, which has an LD50 of 127 mg/kg when administered to mice. At sufficiently high doses, it is associated with nicotine poisoning, which, while common in children (in whom poisonous and lethal levels occur at lower doses per kilogram of body weight ) rarely results in significant morbidity or death. The estimated lower dose limit for fatal outcomes is 500–1,000 mg of ingested nicotine for an adult (6.5–13 mg/kg).

The initial symptoms of a nicotine overdose typically include nausea, vomiting, diarrhea, hypersalivation, abdominal pain, tachycardia (rapid heart rate), hypertension (high blood pressure), tachypnea (rapid breathing), headache, dizziness, pallor (pale skin), auditory or visual disturbances, and perspiration, followed shortly after by marked bradycardia (slow heart rate), bradypnea (slow breathing), and hypotension (low blood pressure). An increased respiratory rate (i.e., tachypnea) is one of the primary signs of nicotine poisoning. At sufficiently high doses, somnolence (sleepiness or drowsiness), confusion, syncope (loss of consciousness from fainting), shortness of breath, marked weakness, seizures, and coma may occur. Lethal nicotine poisoning rapidly produces seizures, and death – which may occur within minutes – is believed to be due to respiratory paralysis.

Toxicity
Today nicotine is less commonly used in agricultural insecticides, which was a main source of poisoning. More recent cases of poisoning typically appear to be in the form of Green Tobacco Sickness (GTS), accidental ingestion of tobacco or tobacco products, or ingestion of nicotine-containing plants. People who harvest or cultivate tobacco may experience GTS, a type of nicotine poisoning caused by dermal exposure to wet tobacco leaves. This occurs most commonly in young, inexperienced tobacco harvesters who do not consume tobacco. People can be exposed to nicotine in the workplace by breathing it in, skin absorption, swallowing it, or eye contact. The Occupational Safety and Health Administration (OSHA) has set the legal limit (permissible exposure limit) for nicotine exposure in the workplace as 0.5 mg/m3 skin exposure over an 8-hour workday. The US National Institute for Occupational Safety and Health (NIOSH) has set a recommended exposure limit (REL) of 0.5 mg/m3 skin exposure over an 8-hour workday. At environmental levels of 5 mg/m3, nicotine is immediately dangerous to life and health.

Pharmacodynamic

 * Potential interaction with sympathomimetic drugs (adrenergic agonists) and sympatholytic drugs (alpha-blockers and beta-blockers).

Pharmacokinetic
Nicotine and cigarette smoke both induce the expression of liver enzymes (e.g., certain cytochrome P450 proteins) which metabolize drugs, leading to the potential for alterations in drug metabolism.
 * Smoking cessation may decrease the metabolism of acetaminophen, beta-blockers, caffeine, oxazepam, pentazocine, propoxyphene, theophylline, and tricyclic antidepressants, leading to higher plasma concentrations of these drugs.
 * Possible alteration of nicotine absorption through the skin from the transdermal nicotine patch by drugs that cause vasodilation or vasoconstriction.
 * Possible alteration of nicotine absorption through the nasal cavity from the nicotine nasal spray by nasal vasoconstrictors (e.g., xylometazoline).
 * Possible alteration of nicotine absorption through oral mucosa from nicotine gum and lozenges by food and drink that modify salivary pH.

Pharmacodynamics
Nicotine acts as a receptor agonist at most nicotinic acetylcholine receptors (nAChRs), except at two nicotinic receptor subunits (nAChRα9 and nAChRα10) where it acts as a receptor antagonist. Such antagonism results in mild analgesia.

Central nervous system
By binding to nicotinic acetylcholine receptors in the brain, nicotine elicits its psychoactive effects and increases the levels of several neurotransmitters in various brain structures – acting as a sort of "volume control". Nicotine has a higher affinity for nicotinic receptors in the brain than those in skeletal muscle, though at toxic doses it can induce contractions and respiratory paralysis. Nicotine's selectivity is thought to be due to a particular amino acid difference on these receptor subtypes. Nicotine is unusual in comparison to most drugs, as its profile changes from stimulant to sedative with increasing dosages, a phenomenon known as "Nesbitt's paradox" after the doctor who first described it in 1969. At very high doses it dampens neuronal activity. Nicotine induces both behavioral stimulation and anxiety in animals. Research into nicotine's most predominant metabolite, cotinine, suggests that some of nicotine's psychoactive effects are mediated by cotinine.

Nicotine activates nicotinic receptors (particularly α4β2 nicotinic receptors, but also α5 nAChRs) on neurons that innervate the ventral tegmental area and within the mesolimbic pathway where it appears to cause the release of dopamine. This nicotine-induced dopamine release occurs at least partially through activation of the cholinergic–dopaminergic reward link in the ventral tegmental area. Nicotine can modulate the firing rate of the ventral tegmental area neurons. These actions are largely responsible for the strongly reinforcing effects of nicotine, which often occur in the absence of euphoria; however, mild euphoria from nicotine use can occur in some individuals. Chronic nicotine use inhibits class I and II histone deacetylases in the striatum, where this effect plays a role in nicotine addiction.

Sympathetic nervous system
Nicotine also activates the sympathetic nervous system, acting via splanchnic nerves to the adrenal medulla, stimulating the release of epinephrine. Acetylcholine released by preganglionic sympathetic fibers of these nerves acts on nicotinic acetylcholine receptors, causing the release of epinephrine (and norepinephrine) into the bloodstream.

Adrenal medulla
By binding to ganglion type nicotinic receptors in the adrenal medulla, nicotine increases flow of adrenaline (epinephrine), a stimulating hormone and neurotransmitter. By binding to the receptors, it causes cell depolarization and an influx of calcium through voltage-gated calcium channels. Calcium triggers the exocytosis of chromaffin granules and thus the release of epinephrine (and norepinephrine) into the bloodstream. The release of epinephrine (adrenaline) causes an increase in heart rate, blood pressure and respiration, as well as higher blood glucose levels.

Pharmacokinetics

As nicotine enters the body, it is distributed quickly through the bloodstream and crosses the blood–brain barrier reaching the brain within 10–20 seconds after inhalation. The elimination half-life of nicotine in the body is around two hours. Nicotine is primarily excreted in urine and urinary concentrations vary depending upon urine flow rate and urine pH.

The amount of nicotine absorbed by the body from smoking can depend on many factors, including the types of tobacco, whether the smoke is inhaled, and whether a filter is used. However, it has been found that the nicotine yield of individual products has only a small effect (4.4%) on the blood concentration of nicotine, suggesting "the assumed health advantage of switching to lower-tar and lower-nicotine cigarettes may be largely offset by the tendency of smokers to compensate by increasing inhalation".

Nicotine has a half-life of 1–2 hours. Cotinine is an active metabolite of nicotine that remains in the blood with a half-life of 18–20 hours, making it easier to analyze.

Nicotine is metabolized in the liver by cytochrome P450 enzymes (mostly CYP2A6, and also by CYP2B6) and FMO3, which selectively metabolizes (S)-nicotine. A major metabolite is cotinine. Other primary metabolites include nicotine N-oxide, nornicotine, nicotine isomethonium ion, 2-hydroxynicotine and nicotine glucuronide. Under some conditions, other substances may be formed such as myosmine.

Glucuronidation and oxidative metabolism of nicotine to cotinine are both inhibited by menthol, an additive to mentholated cigarettes, thus increasing the half-life of nicotine in vivo.

Metabolism
Nicotine decreases hunger and as a consequence food consumption, alongside increasing energy expenditure. The majority of research shows that nicotine reduces body weight, but some researchers have found that nicotine may result in weight gain under specific types of eating habits in animal models. Nicotine effect on weight appears to result from nicotine's stimulation of α3β4 nAChR receptors located in the POMC neurons in the arcuate nucleus and subsequently the melanocortin system, especially the melanocortin-4 receptors on second-order neurons in the paraventricular nucleus of the hypothalamus, thus modulating feeding inhibition. POMC neurons are a precursor of the melanocortin system, a critical regulator of body weight and peripheral tissue such as skin and hair.

Chemistry
Nicotine is a hygroscopic, colorless to yellow-brown, oily liquid, that is readily soluble in alcohol, ether or light petroleum. It is miscible with water in its neutral amine base form between 60 °C and 210 °C. It is a dibasic nitrogenous base, having Kb1=1×10−6, Kb2=1×10−11. It readily forms ammonium salts with acids that are usually solid and water-soluble. Its flash point is 95 °C and its auto-ignition temperature is 244 °C. Nicotine is readily volatile (vapor pressure 5.5 Pa at 25 °C) On exposure to ultraviolet light or various oxidizing agents, nicotine is converted to nicotine oxide, nicotinic acid (niacin, vitamin B3), and methylamine.

Nicotine is chiral and hence optically active, having two enantiomeric forms. The naturally occurring form of nicotine is levorotatory with a specific rotation of [α]D=–166.4° ((−)-nicotine). The dextrorotatory form, (+)-nicotine is physiologically less active than (−)-nicotine. (−)-nicotine is more toxic than (+)-nicotine. The salts of (−)-nicotine are usually dextrorotatory; this conversion between levorotatory and dextrorotatory upon protonation is common among alkaloids. The hydrochloride and sulfate salts become optically inactive if heated in a closed vessel above 180 °C. Anabasine is a structural isomer of nicotine, as both compounds have the molecular formula C10H14N2.

Nicotine that is found in natural tobacco is primarily (99%) the S-enantiomer. Conversely, the most common chemistry synthetic methods for generating nicotine yields a product that is approximately equal proportions of the S- and R-enantiomers. This suggests that tobacco-derived and synthetic nicotine can be determined by measuring the ratio of the two different enantiomers, although means exist for adjusting the relative levels of the enantiomers or performing a synthesis that only leads to the S-enantiomer. There is limited data on the relative physiological effects of these two enantiomers, especially in people. However, the studies to date indicate that (S)-nicotine is more potent than (R)-nicotine and (S)-nicotine causes stronger sensations or irritation than (R)-nicotine. Studies have not been adequate to determine the relative addictiveness of the two enantiomers in people. Pod mod electronic cigarettes use nicotine in the form of a protonated nicotine, rather than free-base nicotine found in earlier generations.

Preparation
The first laboratory preparation of nicotine (as its racemate) was described in 1904.
 * Nicotine synthesis 1904.svg

The starting material was an N-substituted pyrrole derivative, which was heated to convert it by a [1,5] sigmatropic shift to the isomer with a carbon bond between the pyrrole and pyridine rings, followed by methylation and selective reduction of the pyrrole ring using tin and hydrochloric acid. Many other syntheses of nicotine, in both racemic and chiral forms have since been published.

Biosynthesis
The biosynthetic pathway of nicotine involves a coupling reaction between the two cyclic structures that comprise nicotine. Metabolic studies show that the pyridine ring of nicotine is derived from niacin (nicotinic acid) while the pyrrolidine is derived from N-methyl-Δ1-pyrrollidium cation. Biosynthesis of the two component structures proceeds via two independent syntheses, the NAD pathway for niacin and the tropane pathway for N-methyl-Δ1-pyrrollidium cation.

The NAD pathway in the genus Nicotiana begins with the oxidation of aspartic acid into α-amino succinate by aspartate oxidase (AO). This is followed by a condensation with glyceraldehyde-3-phosphate and a cyclization catalyzed by quinolinate synthase (QS) to give quinolinic acid. Quinolinic acid then reacts with phosphoribosyl pyrophosphate catalyzed by quinolinic acid phosphoribosyl transferase (QPT) to form niacin mononucleotide (NaMN). The reaction now proceeds via the NAD salvage cycle to produce niacin via the conversion of nicotinamide by the enzyme nicotinamidase.

The N-methyl-Δ1-pyrrollidium cation used in the synthesis of nicotine is an intermediate in the synthesis of tropane-derived alkaloids. Biosynthesis begins with decarboxylation of ornithine by ornithine decarboxylase (ODC) to produce putrescine. Putrescine is then converted into N-methyl putrescine via methylation by SAM catalyzed by putrescine N-methyltransferase (PMT). N-methyl putrescine then undergoes deamination into 4-methylaminobutanal by the N-methyl putrescine oxidase (MPO) enzyme, 4-methylaminobutanal then spontaneously cyclize into N-methyl-Δ1-pyrrollidium cation.

The final step in the synthesis of nicotine is the coupling between N-methyl-Δ1-pyrrollidium cation and niacin. Although studies conclude some form of coupling between the two component structures, the definite process and mechanism remains undetermined. The current agreed theory involves the conversion of niacin into 2,5-dihydropyridine through 3,6-dihydronicotinic acid. The 2,5-dihydropyridine intermediate would then react with N-methyl-Δ1-pyrrollidium cation to form enantiomerically pure (−)-nicotine.

Detection in body fluids
Nicotine can be quantified in blood, plasma, or urine to confirm a diagnosis of poisoning or to facilitate a medicolegal death investigation. Urinary or salivary cotinine concentrations are frequently measured for the purposes of pre-employment and health insurance medical screening programs. Careful interpretation of results is important, since passive exposure to cigarette smoke can result in significant accumulation of nicotine, followed by the appearance of its metabolites in various body fluids. Nicotine use is not regulated in competitive sports programs.

Methods for analysis of enantiomers
Methods for measuring the two enantiomers are straightforward and include normal-phase liquid chromatography, liquid chromatography with a chiral column. However, since methods can be used to alter the two enantiomers, it may not be possible to distinguish tobacco-derived from synthetic nicotine simply by measuring the levels of the two enantiomers. A new approach uses hydrogen and deuterium nuclear magnetic resonance to distinguish tobacco-derived and synthetic nicotine based on differences the substrates used in the natural synthetic pathway performed in the tobacco plant and the substrates most used in synthesis. Another approach measures the carbon-14 content which also differs between natural and laboratory-based tobacco. These methods remain to be fully evaluated and validated using a wide range of samples.

Natural occurrence
Nicotine is a secondary metabolite produced in a variety of plants in the family Solanaceae, most notably in tobacco Nicotiana tabacum, where it can be found at high concentrations of 0.5 to 7.5%. Nicotine is also found in the leaves of other tobacco species, such as Nicotiana rustica (in amounts of 2–14%). Nicotine production is strongly induced in response to wounding as part of a jasmonate-dependent reaction. Specialist insects on tobacco, such as the tobacco hornworm (Manduca sexta), have a number of adaptations to the detoxification and even adaptive re-purposing of nicotine. Nicotine is also found at low concentrations in the nectar of tobacco plants, where it may promote outcrossing by affecting the behavior of hummingbird pollinators.

Nicotine occurs in smaller amounts (varying from 2–7 μg/kg, or 20–70 millionths of a percent wet weight ) in other Solanaceaeous plants, including some crop species such as potatoes, tomatoes, eggplant, and peppers, as well as non-crop species such as Duboisia hopwoodii. The amounts of nicotine in tomatoes lowers substantially as the fruit ripens. A 1999 report found "In some papers it is suggested that the contribution of dietary nicotine intake is significant when compared with exposure to ETS [environmental tobacco smoke] or by active smoking of small numbers of cigarettes. Others consider the dietary intake to be negligible unless inordinately large amounts of specific vegetables are consumed." The amount of nicotine eaten per day is roughly around 1.4 and 2.25 μg/day at the 95th percentile. These numbers may be low due to insufficient food intake data. The concentrations of nicotine in vegetables are difficult to measure accurately, since they are very low (parts per billion range).

History, society and culture
Nicotine was originally isolated from the tobacco plant in 1828 by chemists Wilhelm Heinrich Posselt and Karl Ludwig Reimann from Germany, who believed it was a poison. Its chemical empirical formula was described by Melsens in 1843, its structure was discovered by Adolf Pinner and Richard Wolffenstein in 1893,   and it was first synthesized by Amé Pictet and A. Rotschy in 1904.

Nicotine is named after the tobacco plant Nicotiana tabacum, which in turn is named after the French ambassador in Portugal, Jean Nicot de Villemain, who sent tobacco and seeds to Paris in 1560, presented to the French King, and who promoted their medicinal use. Smoking was believed to protect against illness, particularly the plague.

Tobacco was introduced to Europe in 1559, and by the late 17th century, it was used not only for smoking but also as an insecticide. After World War II, over 2,500 tons of nicotine insecticide were used worldwide, but by the 1980s the use of nicotine insecticide had declined below 200 tons. This was due to the availability of other insecticides that are cheaper and less harmful to mammals.

The nicotine content of popular American-brand cigarettes has increased over time, and one study found that there was an average increase of 1.78% per year between the years of 1998 and 2005.

Although methods of production of synthetic nicotine have existed for decades, it was believed that the cost of making nicotine by laboratory synthesis was cost prohibitive compared to extracting nicotine from tobacco. However, recently synthetic nicotine started to be found in different brands of e-cigarettes and oral pouches and marketed as "tobacco-free."

The US FDA is tasked with reviewing tobacco products such as e-cigarettes and determining which can be authorized for sale. In response to the likelihood that FDA would not authorize many e-cigarettes to be marketed, e-cigarette companies began marketing products that they claimed to contain nicotine that were not made or derived from tobacco, but contained synthetic nicotine instead, and thus, would be outside FDA's tobacco regulatory authority. Similarly, nicotine pouches that claimed to contain non-tobacco (synthetic) nicotine were also introduced. The cost of synthetic nicotine has decreased as the market for the product increased. In March 2022, the U.S. Congress passed a law (the Consolidated Appropriations Act, 2022) that expanded FDA's tobacco regulatory authority to include tobacco products containing nicotine from any source, thereby including products made with synthetic nicotine.

Legal status
In the United States, nicotine products and nicotine replacement therapy products like Nicotrol are only available to people 18 and above; proof of age is required; not for sale in vending machine or from any source where proof of age cannot be verified. As of 2019, the minimum age to purchase tobacco in the US is 21 at the federal level.

In the European Union, the minimum age to purchase nicotine products is 18. However, there is no minimum age requirement to use tobacco or nicotine products.

In the United Kingdom, the Tobacco and Related Products Regulations 2016 implemented the European directive 2014/40/EU, amended by Tobacco Products and Nicotine Inhaling Products (Amendment etc.) (EU Exit) Regulations 2019 and the Tobacco Products and Nicotine Inhaling Products (Amendment) (EU Exit) Regulations 2020. Additionally other regulations limit advertising, sale and display of tobacco products and other products containing nicotine for human consumption. The Sunak government has proposed banning disposable vapes, to limit the appeal, and affordability, for children.

In media
In some anti-smoking literature, the harm that tobacco smoking and nicotine addiction does is personified as Nick O'Teen, represented as a humanoid with some aspect of a cigarette or cigarette butt about him or his clothes and hat. Nick O'Teen was a villain that was created for the Health Education Council. The character was featured in three animated anti-smoking public service announcements in which he tries to get kids addicted to cigarettes before being foiled by the DC Comics character Superman.

Nicotine was often compared to caffeine in advertisements in the 1980s by the tobacco industry, and later in the 2010s by the electronic cigarettes industry, in an effort to reduce the stigmatization and the public perception of the risks associated with nicotine use.

Central nervous system
While acute/initial nicotine intake causes activation of neuronal nicotine receptors, chronic low doses of nicotine use leads to desensitization of those receptors (due to the development of tolerance) and results in an antidepressant effect, with early research showing low dose nicotine patches could be an effective treatment of major depressive disorder in non-smokers.

Though tobacco smoking is associated with an increased risk of Alzheimer's disease, there is evidence that nicotine itself has the potential to prevent and treat Alzheimer's disease.

Smoking is associated with a decreased risk of Parkinson's disease; however, it is unknown whether this is due to people with healthier brain dopaminergic reward centers (the area of the brain affected by Parkinson's) being more likely to enjoy smoking and thus pick up the habit, nicotine directly acting as a neuroprotective agent, or other compounds in cigarette smoke acting as neuroprotective agents.

Immune system
Immune cells of both the innate immune system and adaptive immune systems frequently express the α2, α5, α6, α7, α9, and α10 subunits of nicotinic acetylcholine receptors. Evidence suggests that nicotinic receptors which contain these subunits are involved in the regulation of immune function.

Optopharmacology
A photoactivatable form of nicotine, which releases nicotine when exposed to ultraviolet light with certain conditions, has been developed for studying nicotinic acetylcholine receptors in brain tissue.

Oral health
Several in vitro studies have investigated the potential effects of nicotine on a range of oral cells. A recent systematic review concluded that nicotine was unlikely to be cytotoxic to oral cells in vitro in most physiological conditions but further research is needed. Understanding the potential role of nicotine in oral health has become increasingly important given the recent introduction of novel nicotine products and their potential role in helping smokers quit.

title: Nicotine


text:
Turbo Pascal

Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal running on the operating systems CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at Borland, and was notable for its very fast compiling. Turbo Pascal, and the later but similar Turbo C, made Borland a leader in PC-based development tools.

For versions 6 and 7 (the last two versions), both a lower-priced Turbo Pascal and more expensive Borland Pascal were produced; Borland Pascal was oriented more toward professional software development, with more libraries and standard library source code. The name Borland Pascal is also used more generically for Borland's dialect of the language Pascal, significantly different from Standard Pascal.

Borland has released three old versions of Turbo Pascal free of charge because of their historical interest: the original Turbo Pascal (now known as 1.0), and versions 3.02 and 5.5 for DOS.

History
Philippe Kahn first saw an opportunity for Borland, his newly formed software company, in the field of programming tools. Historically, the vast majority of programmers saw their workflow in terms of the edit/compile/link cycle, with separate tools dedicated to each task. Programmers wrote source code using a text editor; the source code was then compiled into object code (often requiring multiple passes), and a linker combined object code with runtime libraries to produce an executable program.

In the early IBM PC market (1981–1983) the major programming tool vendors all made compilers that worked in a similar fashion. For example, the Microsoft Pascal system consisted of two compiler passes and a final linking pass (which could take minutes on systems with only floppy disks for secondary storage, although programs were very much smaller than they are today). This process was less resource-intensive than the later integrated development environment (IDE). Vendors of software development tools aimed their products at professional developers, and the price for these basic tools plus ancillary tools like profilers ran into the hundreds of dollars.

Kahn's idea was to package all these functions in an integrated programming toolkit designed to have much better performance and resource utilisation than the usual professional development tools, and charge a low price for a package integrating a custom text editor, compiler, and all functionality need to produce executable programs. The program was sold by direct mail order for US$49.95, without going through established sales channels (retailers or resellers).

The Turbo Pascal compiler was based on the Blue Label Pascal compiler originally produced for the NasSys cassette-based operating system of the Nascom microcomputer in 1981 by Anders Hejlsberg. Borland licensed Hejlsberg's "PolyPascal" compiler core (Poly Data was the name of Hejlsberg's company in Denmark), and added the user interface and editor. Anders Hejlsberg joined the company as an employee and was the architect for all versions of the Turbo Pascal compiler and the first three versions of Borland Delphi.

The compiler was first released as Compas Pascal for CP/M, and then released on 20 November 1983 as Turbo Pascal for CP/M (including the Apple II fitted with a Z-80 SoftCard, effectively converting the 6502-based Apple into a CP/M machine, the Commodore 64 with CP/M cartridge, and the later DEC Rainbow), CP/M-86, and DOS machines. On its launch in the United States market, Turbo Pascal retailed for US$49.99, a very low price for a compiler at the time. The integrated Pascal compiler was of good quality compared to other Pascal products of the time.

The Turbo name alluded to the speed of compiling and of the executables produced. The edit/compile/run cycle was fast compared to other Pascal implementations because everything related to building the program was stored in RAM, and because it was a one-pass compiler written in assembly language. Compiling was much faster than compilers for other languages (even Borland's own later compilers for C), and other Pascal compilers, and programmer time was also saved since the program could be compiled and run from the IDE. The execution speed of these COM-format programs was a revelation for developers whose only prior experience programming microcomputers was with interpreted BASIC or UCSD Pascal, which compiled to p-code which was then interpreted at runtime.

Unlike some other development tools, Turbo Pascal disks had no copy protection. Turbo Pascal came with the "Book License": "You must treat this software just like a book ... [it] may be used by any number of people ... may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another."

Reception
Borland sold about 250,000 copies of Turbo Pascal in two years, which Bruce F. Webster of Byte described as "an amazing figure for a computer language". He reported six months later that the figure had risen to "more than 400,000 copies in a marketplace that had been estimated as having only 30,000 potential buyers".

Jerry Pournelle wrote in the magazine in February 1984 that Turbo Pascal "comes close to what I think the computer industry is headed for: well documented, standard, plenty of good features, and a reasonable price". He disliked the requirement to buy another license to distribute binaries, but noted that "it turns out not to be a lot more. Borland only wants another US$100" more than the US$49.95 base price, and that "my first impression of Turbo is that it's probably worth US$149.95. It looks to do everything MT+ with the Speed Programming Package does, and maybe even do it faster and better". Pournelle reported in July that, according to Kahn, IBM had refused to resell Turbo Pascal unless the price was at least US$200; he noted that "Turbo is much better than the Pascal IBM sells", and unlike the latter was compatible with the IBM PCjr. Three Byte reviewers praised Turbo Pascal in the same issue. One reviewer said that because of dialect differences "Turbo is not really Pascal. But it's very useful". While cautioning that it was not suitable for developing very large applications, he concluded that Turbo Pascal "is well written, fun to use at times, and fast enough to make up for its few shortcomings ... it is a bargain that shouldn't be passed up". A second called the DOS version "without doubt, the best software value I have ever purchased", while a third said that Borland "deserves praise for" the "high-value" CP/M version.

Pournelle in August 1985 called version 3.0 "a distinct improvement on the already impressive version 2" and said that the new book license "seems quite fair to me". He said that "Turbo Pascal has got to be the best value in languages on the market today", and that Borland led the industry in "delivering excellent products at reasonable costs". Despite finding what the magazine called "a serious bug" in 3.0, and decreased compatibility with PC clones, Byte in February 1986 stated that "it is hard to avoid recommending Turbo to anyone who wants to program in Pascal", citing improved speed and graphic routines. When reviewing four other Pascal compilers in December 1986, the magazine described Turbo Pascal as "practical and attractive to programmers at all levels of expertise". Besides allowing applications larger than 64 KB, Byte in 1988 reported substantially faster compiling and executing for version 4.0, and that that although it did not maintain previous versions' "almost total" backward compatibility, conversion was fast and easy. The reviewer concluded, "I highly recommend Turbo Pascal 4.0 as an addition to any programmer's software repertoire".

Webster praised the language, stating in August 1985 that Turbo Pascal "is best known for its small size, incredible compile speeds, and fast execution times". He noted that the software's quality and low price was especially surprising after the "JRT Pascal fiasco", and stated that even at the new higher US$69.95 price, version 3.0 was "probably still the best software deal on the market". PC Magazine was similarly complimentary in November 1984, stating that "nothing like Turbo Pascal has ever existed for PC-DOS before". It praised the software's low price, speed, and unusually good documentation for a compiler, and noted the existence of many utilities for Turbo Pascal from other companies. The review stated that the IDE that simplified the edit-compile-run-debug loop made Turbo Pascal accessible, like BASIC, to new programmers.

Byte in 1989 listed Turbo C and Turbo Pascal as among the "Distinction" winners of the Byte Awards. Citing their user interface and continued emphasis on speed, the magazine stated that "for rapid prototyping there's not much better". In the same issue Pournelle again praised version 4.0 and 5.0 of Turbo Pascal. Citing Anacreon as "a good example of how complex a program you can write in Pascal", and the many libraries from Borland and other developers, he wrote "I think it may well be the language for the rest of us".

Scott MacGregor of Microsoft said that Bill Gates "couldn't understand why our stuff was so slow" compared to Turbo Pascal. "He would bring in poor Greg Whitten [programming director of Microsoft languages] and yell at him for half an hour" because their company was unable to defeat Kahn's small startup, MacGregor recalled.

Successors
By 1995 Borland had dropped Turbo/Borland Pascal and replaced it with the rapid application development (RAD) environment Borland Delphi, based on Object Pascal. The 32- and 64-bit Delphi versions still support the more portable Pascal enhancements of the earlier products (i.e., those not specific to 16-bit code) including the earlier static object model. This language backwards compatibility means much old Turbo Pascal code can still be compiled and run in a modern environment today.

Other suppliers have produced software development tools compatible with Turbo Pascal. The best-known are Free Pascal and Virtual Pascal.

Syntax

 * Pascal is not case-sensitive.
 * Historically, Pascal comments are enclosed, or  , and these can span any number of lines. Later versions of Borland Pascal also supported C++-style comments  , which finish at the end of the line.
 * The syntax for the statement  is more flexible than standard Pascal.
 * Sets may only have up to 256 (28) members.
 * The standard Pascal  preceded by a length byte is supported, and takes a fixed amount of storage; later versions added a more flexible null-terminated type, calling the older type "short string". Older source code which handles strings in non-standard ways (e.g., directly manipulating the length byte like   to truncate a string) must either have its strings declared as short strings, or be rewritten.

This is the classic "Hello, World!" program in Turbo Pascal:

This asks for a name and writes it back to the screen a hundred times:

Assembly language
While all versions of Turbo Pascal could include inline machine code, starting with version 6 it was possible to integrate assembly language within Pascal source code.

Support for the various x86 memory models was provided by inline assembly, compiler options, and language extensions such as the "absolute" keyword. The Turbo Assembler, TASM, a standard x86 assembler independent of TP, and source-compatible with the widely used Microsoft Macro Assembler MASM, was supplied with the enhanced "Borland Pascal" versions.

Debugging and profiling
The IDE provided several debugging facilities, including single stepping, examination and changing of variables, and conditional breakpoints. In later versions assembly-language blocks could be stepped through. The user could add breakpoints on variables and registers in an IDE window. Programs using IBM PC graphics mode could flip between graphics and text mode automatically or manually, or display both on two screens. For cases where the relatively simple debugging facilities of the IDE were insufficient, Turbopower Software produced a more powerful debugger, T-Debug. The same company produced Turbo Analyst and Overlay Manager for Turbo Pascal. T-Debug was later updated for Turbo Pascal 4, but discontinued with the release of Borland's Turbo Debugger (TD), which also allowed some hardware intervention on computers equipped with the new 80386 processor.

TD was usually supplied in conjunction with the Turbo Assembler and the Turbo Profiler, a code profiler that reported on the time spent in each part of the program to assist program optimisation by finding bottlenecks. The books included with Borland Pascal had detailed descriptions of the Intel assembler language, including the number of clock cycles required by each instruction. Development and debugging could be carried out entirely within the IDE unless the advanced debugging facilities of Turbopower T-Debug, and later TD, were required.

Later versions also supported remote debugging via an RS-232 communication cable.

Units
Over the years, Borland enhanced not only the IDE, but also extended the programming language. A development system based on ISO standard Pascal requires implementation-specific extensions for the development of real-world applications on the platforms they target. Standard Pascal is designed to be platform-independent, so prescribes no low-level access to hardware- or operating system-dependent facilities. Standard Pascal also does not prescribe how a large program should be split into separate compiling units. From version 4, Turbo Pascal adopted the concept of units from UCSD Pascal. Units were used as external function libraries, like the object files used in other languages such as FORTRAN or C.

For example, the line  in a program included the unit called crt; the   is the mechanism for using other compiling units. and  were the keywords used to specify, within the unit, what was (and what was not) visible outside the unit. This is similar to the  and   keywords in other languages such as C++ and Java.

Units in Borland's Pascal were similar to Modula-2's separate compiling system. In 1987, when Turbo Pascal 4 was released, Modula-2 was making inroads as an educational language which could replace Pascal. Borland, in fact, had a Turbo Modula-2 compiler, but only released it on CP/M (its user interface was almost identical to that of Turbo Pascal 1–3) with little marketing. A much improved DOS version was developed, but as Borland was unwilling to publish the results, the authors including Niels Jensen bought the rights and formed Jensen & Partners International to publish it as JPI TopSpeed Modula-2. Instead Borland chose to implement separate compiling in their established Pascal product.

Separate compiling was not part of the standard Pascal language, but was already available in UCSD Pascal, which was very popular on 8-bit machines. Turbo Pascal syntax for units appears to have been borrowed from UCSD Pascal. Earlier versions of Turbo Pascal, designed for computers with limited resources, supported a "chain and execute" system of dynamic linking for separately compiled objects, similar to the system widely used in BASIC. Also, the language had a statement to include separate source code in a program when necessary, and overlaying was supported from TP3, but, as with overlays, chained objects had to fit into the original (limited) program memory space. As computing and storage facilities advanced, the ability to generate large EXE files was added to Turbo Pascal, with the ability to statically link and collectively load separately compiled objects.

The .TPU files output by compiling a Turbo Pascal unit are tightly linked to the internal structures of the compiler, rather than standard .OBJ linkable files. This improved compiling and linking times, but meant that .TPU files could not be linked with the output of other languages or even used with different releases of Turbo Pascal unless recompiled from source.

Object-oriented programming
From version 5.5 some object-oriented programming features were introduced: classes, inheritance, constructors and destructors. The IDE was already augmented with an object browser interface showing relations between objects and methods and allowing programmers to navigate the modules easily. Borland called its language Object Pascal, which was greatly extended to become the language underlying Delphi (which has two separate OOP systems). The name "Object Pascal" originated with the Pascal extensions developed by Apple Computer to program its Lisa and Macintosh computers. Pascal originator Niklaus Wirth consulted in developing these extensions, which built upon the record type already present in Pascal.

Issue with CRT unit on fast processors
Several versions of Turbo Pascal, including the last version 7, include a unit named CRT, which was used by many fullscreen text-mode applications on a CRT. This unit contains code in its initialization section to determine the CPU speed and calibrate delay loops. This code fails on processors with a speed greater than about 200 MHz and aborts immediately with a "Runtime Error 200" message. (the error code 200 had nothing to do with the CPU speed 200 MHz). This is caused because a loop runs to count the number of times it can iterate in a fixed time, as measured by the real-time clock. When Turbo Pascal was developed it ran on machines with CPUs running at 2.5 to 8 MHz, and little thought was given to the possibility of vastly higher speeds, so from about 200 MHz enough iterations can be run to overflow the 16-bit counter. A patch was produced when machines became too fast for the original method, but failed as processor speeds increased yet further, and was superseded by others.

Programs subject to this error can be recompiled from source code with a compiler patched to eliminate the error (using a TURBO.TPL compiled with a corrected CRT unit) or, if source code is unavailable, executables can be patched by a tool named TPPATCH or equivalent, or by loading a terminate-and-stay-resident program before running the faulty program.

There are also patches to the TP7 compiler, thus if the Pascal source is available, a new compiling's code will work without the compiled code needing a patch. If the source code is available, porting to libraries without CPU clock speed dependency is a solution too.

Floating-point arithmetic
There were several floating point types, including  (the 4-byte [IEEE 754] representation)   (the 8-byte IEEE 754 representation),   (a 10-byte IEEE 754 representation used mostly internally by numeric coprocessors) and   (a 6-byte representation).

In the early days,  was the most popular. Most PCs of the era did not have a floating-point coprocessor so all floating-point arithmetic had to be done in software. Borland's own floating-point algorithms on  were quicker than using the other types, though its library also emulated the other types in software.

Version 1

Version 1, released on 20 November 1983, was a basic all-in-one system, working in memory and producing .COM executable files for DOS and CP/M, and equivalent .CMD executables for CP/M-86 (totally different from .CMD batch files later used in 32-bit Microsoft Windows). Source code files were limited to 64 KB to simplify the IDE, and DOS .COM files were limited to 64 KB each of code, stack and global (static) variables. Program source code could be extended by using the include facility if the source code exceeded the memory limit of the editor. There were different versions of Turbo Pascal for computers running DOS, CP/M, or CP/M-86 with 64 KB of memory and at least one floppy disk drive. The CP/M version could run on the many CP/M machines of the time with Z80 processors, or an Apple II with Z80 card. The DOS and CP/M-86 versions ran on the many 8086 and 8088 machines which became available, including the IBM PC. The installer, lister, and compiler with its IDE, and the source code for a simple spreadsheet program called MicroCalc written by Philippe Kahn as a demonstration, would fit on a single floppy disc. A disc copy without MicroCalc would accommodate the source code and compiled executable of a reasonable-sized program—as it was common at the time for users to have only a single floppy drive as mass storage, it was a great convenience to be able to fit both the compiler and the program being written on a single disc, avoiding endless disc swapping.

The architecture of the various machines running MS-DOS additionally limited the maximum user memory to under 1 MB (e.g., machines hardware-compatible with the IBM PC were limited to 640 KB).

The Turbo Pascal IDE was very advanced for its day. It was able to perform well and compile very fast with the amount of RAM on a typical home computer. The IDE was simple and intuitive to use, and had a well-organized system of menus. Early versions of the editor used WordStar key functions, which was the de facto standard at the time. Later versions of the IDE, designed for PCs with more disk space and memory, could display the definitions of the keywords of the language by putting the cursor over a keyword and pressing the F1 key (conventionally used to display help). Many definitions included example code.

In addition to standard executable programs, the compiler could generate terminate-and-stay-resident (TSR) programs, small utilities that stayed in memory and let the computer do other tasks—running several programs at the same time, multitasking, was not otherwise available. Borland produced a small application suite called Sidekick that was a TSR letting the user keep a diary, notes, and so forth.

Version 2
Version 2, released a few months later on 17 April 1984, was an incremental improvement to the original Turbo Pascal, to the point that the reference manual was at first identical to version 1's, down to having 1983 as the copyright date on some of the compiler's sample output, but had a separate "Addendum to Reference Manual: Version 2.0 and 8087 Supplement" manual with separate page numbering. Additions included an overlay system, where separate overlay procedures would be automatically swapped from disk into a reserved space in memory. This memory was part of the 64kB RAM used by the program's code, and was automatically the size of the largest overlay procedure. Overlay procedures could include overlay sections themselves, but unless a RAM disk was used, the resulting disk swapping could be slow. 2.0 also added the Dispose procedure to manage the heap, allowing individual dynamic variables to be freed, as an alternative to the more primitive 'Mark/Release' system and increased compatibility with WordStar commands plus use of the numeric keypad on the IBM PC and compatibles. Such PCs also had new text window and CGA graphics mode commands as well as being able to use the PC's speaker for tones. Finally, DOS and CP/M-86 machines with an 8087 maths coprocessor (or later compatible) had an alternative TURBO-87 compiler available to purchase. It supported the 8087's long real data types with a range of 1.67E-307 to 1.67E+308 to 14 significant figure precision but with a much greater processing speed. The manual notes that although source code for the Turbo Pascal's software real data types offering a range of 1E-63 to 1E+63 to 11 significant figures, these were incompatible at a binary level: as well as having a much larger range, the software reals took six bytes in memory and the 8087 ones were eight.

Like version 1, version 2 for CP/M-80 only ran on Z80-based CP/M machines.

Version 3
Version 3 was released on 17 September 1986. Turbo Pascal 3 supported turtle graphics. In addition to the default software real numbers and 8087 edition of the compiler, Borland also offered a binary-coded decimal (BCD) version (TURBOBCD) which offered the same numeric range as real data types but to 18 significant figures.

Version 4
Released on 20 November 1987, Version 4 was a total rewrite, with both look and feel and internal operation much changed. The compiler generated executables in .EXE format under DOS, rather than the simpler but more restricted .COM executables. The by-then obsolete CP/M and CP/M-86 operating system versions were dropped when Turbo Pascal was rewritten. Version 4 introduced units, and a full-screen text user interface with pull-down menus; earlier versions had a text-based menu screen and a separate full-screen editor. (Microsoft Windows was still very experimental when the first version was released, and even mice were rare.) An add-on package, the Turbo Pascal Graphix Toolbox, was available for Turbo Pascal V4.

Version 5.0
Colour displays were replacing monochrome; Turbo Pascal version 5.0, released 24 August 1988, introduced blue as the editor's default background color, used by Borland's DOS compilers until the end of this product line in the mid-1990s. It also added debugger support for breakpoints and watches. Later versions came in two packages with the same version number: a less expensive "Turbo" package, and a "Borland" package with enhanced capabilities and more add-ons.

Version 5.5
This version, released on 2 May 1989, introduced object-oriented programming features for the Pascal language, including concept of classes, static and dynamic objects, constructors and destructors and inheritance, which would become the basis for the Object Pascal found in Borland Delphi. The IDE uses the default blue colour scheme that would also be used on later Borland Turbo products. Other changes to IDE include the addition context-sensitive help with description of all built-in functions, and the ability to copy code fragments from the help to edit window.

Version 6.0
Version 6 was released on 23 October 1990. Changes from 5.5 include: the addition of inline assembly, the addition of the Turbo Vision library, mouse support, clipboard for text manipulations, multiple document interface supporting up to nine edit windows.

Version 7.0
Version 7 was released on 27 October 1992. Changes from 6.0 include support for the creation of DOS and Windows executables and Windows DLLs, and syntax highlighting.

Turbo Pascal for Windows
Two versions named "Turbo Pascal for Windows" (TPW), for Windows 3.x, were released: TPW 1.0, based on Turbo Pascal 6 but released about 2 years later, and 1.5, released after Turbo Pascal 7; they were succeeded by Borland Pascal 7, which had Windows support. The Windows compiler in Pascal 7 was titled Borland Pascal for Windows.

Both versions built Windows-compatible programs, and featured a Windows-based IDE, as opposed to the DOS-based IDE in Turbo Pascal. The IDE and editor commands conformed to the Microsoft Windows user interface guidelines instead of the classic TP user interface. The support for Windows programs required the Object Windows Library (OWL), similar but not identical to that for the first release of Borland C++, and radically different from the earlier DOS Turbo Vision environment. Turbo Pascal was superseded for the Windows platform by Delphi; the Delphi compiler can produce console programs and graphical user interface (GUI) applications, so that using Turbo and Borland Pascal became unnecessary.

Turbo Pascal for Macintosh
Borland released Turbo Pascal for Macintosh in 1986. Much like versions 1 to 3 for other operating systems, it was written in compact assembly language and had a very powerful IDE, but no good debugger. Borland did not support this product very well, although they issued a version 1.1, patched to run on the 32-bit Macintosh II. Macintosh support was dropped soon after.

Freeware releases
Borland released several versions of Turbo Pascal as freeware after they became "antique software", with 1.0 for DOS on 1 February 2000, 3.02 on 10 February 2000, 5.5 on 21 February 2002, Turbo Pascal 7.01 French version in year 2000. Most of the downloads are still available on the successor website of Embarcadero Technologies.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Turbo Pascal