text:
Computer Programming/Structured programming

Overview
Structured programming is the suggested antidote to unstructured programming, which existed for decades before Structured programming was invented.

In the beginning, there was UN-structured programming
An unstructured program is a procedural program – the statements are executed in sequence as written. But this type of programming uses the goto statement. A goto statement allows control to be passed to any other place in the program. When a goto statement is executed, the sequence continues from the target of the goto. Thus to understand how a program works, you have to pretend to execute it. This means that it is often difficult to understand the logic of such a program. Some program compilers cross-index where a goto connects to, making it practical to rapidly navigate the source code. However, it was a common practice in some programming languages to use a variable in association with where the goto goes, making automated indexing impractical. There are similar problems in some structured programming languages, such as how foreign language views are implemented, to permit many people to view the same computer data, in their human language.

This contrasts with the idea of using some form of abstraction to understand how a program works - as in structured programming.

For this reason, it was suggested by Dijkstra that the goto statement should be banned.

Structured programming
In one view, structured programming is programming that avoids using the potentially dangerous goto statement. This prevents potentially confusing transfers of control. Many structured programming languages support the goto statement, which can be used in a structured manner. For example, to exit to the end of a routine, or return to the beginning of a loop.

In another view, structured programming confines itself to using control structures having only one entry point and one exit point. The most important of these structures are sequence, selection (if and if..else) and repetition (while).

Yet another view is that structured programs are programs written in such a way that they can be understood easily using abstraction. Abstraction means being able to understand the overall purpose of some code without understanding the detail. A prime mechanism for abstraction is the procedure (method). But the above-mentioned single-entry single-exit structures also help in using abstraction.

Structured programming was made possible by high-level languages and packages of related programs, that could be flow charted with software diagramming techniques understandable to non-programmers.

The Inventors
A few computer scientists were responsible for discovering the idea of Structured Programming, and communicating this notion to the world of other programmers. Structured programming was first embodied in the ALGOL (Algorithmic Language) language (which became the first high-level language used for systems programming in the Burroughs B5000 MCP (OS), (designed by Bob Barton, later a professor at the University of Utah, where he influenced a student Alan Kay who invented the GUI window and was one of the developers of Smalltalk). In turn, ALGOL became the basis of Simula, the first object-oriented language.

ALGOL was based on a language design formalism called BNF (Backus-Naur Form) after its originators John Backus and Peter Naur.

The landmark book in the technique was "Structured Programming" (Academic Press 1972), which contained three sections: "Notes on Structured Programming" by Edsger W. Dijkstra, "Notes on Data Structuring" by C.A.R. Hoare, and "Hierarchical Program Structures" by Ole-Johan Dahl and C.A.R Hoare. The last section introduced Simula and its object-oriented and concurrency features.

Edsgar Djikstra also wrote the book "A Discipline of Programming" (Prentice Hall, 1976).

Another luminary in the structured programming world is Donald Knuth who wrote the multi-volume "The Art of Computer Programming".

Later a book called "Structured Design" was written by Ed Yourdon and Larry Constantine, which many consider is structured programming, but it is not. This was a graphical technique which was extremely tedious in practice, and although mostly abandoned has successors in other non-formal approaches such as UML. The technique outlined in Structured Design and Structured Programming are very different and should not be confused because they share the word Structured.

Further readings:

 * Isn't goto evil? - comparing goto and return.


text:
Genealogy/Hardcopy

Genealogy research creates a mountain of paper. Even those who store their genealogy on a computer must have an organized method for indexing, storing, and retrieving documents. For people who do not use a computer, an efficient filing system is even more essential.

As mentioned in the previous chapter, a good filing system has these qualities:

System is easy to understand, use, and maintain.
Nothing can waste more time than spending hours searching through mountains of paper to find a scrap of parchment you stored 5 years ago. Organized storage of your documents is essential. more...

All materials are stored securely and redundantly
Nothing can ruin years worth of work faster than a disaster to your archives. Fire, flood, tornado... they can destroy years worth of work and permanently eliminate original works forever. For this reason, you should secure your creation by keeping copies of your work in a separate location. Store original documents, such as family bibles, birth certificates, and photos in a safe or bank deposit box. Store only copies of the original in with your files. more...

Provides the ability to transport relevant data to research sites

 * Original Documents

Your original documents have cost you time and trouble to gather, even if they are merely photocopies. If they are old family bibles, or birth certificates from a county courthouse which has since burned down, they are irreplaceable. As discussed elsewhere, irreplaceable documents need to be stored in a safe deposit box. Your replaceable documents should remain safely at home in your files, together with hand- or photo-copies of the irreplaceable ones.

 * Take Information, Not Originals

When you are doing research, you need to know what you already know, to guide your search. Since you will sometimes need to go to a library or archive to try to find the missing link in your family tree, you will need to be able to take with you the records which are relevant to your current search. This could mean a printout from your computer data base, or it could mean extracting some pages from your three-ring binder.

The optimum might be to travel to the remote archive with a copy of your entire, computerized database on a notebook computer. This may be impractical, for any of several reasons: you might not be able to bring your notebook computer into the archives, you might not bave a notebook computer, there might be no place to plug it in (and dead batteries), and so on. Therefore your record-keeping system should allow you to extract what you know, or a subset of it, in a compact, easily accessible form.

You might want to bring along copies of birth certificates, lists of dates (of birth, death, marriage, immigration, et cetera) and a copy of a family tree. You could take photocopies, or abstracts of the information. A computerised record keeping system which could print out an abstract of the information (and the sources from which it came) you have for some of the people in your database would be an enormous help. So would a logical, up-to-date filing system which allows you to pull out that information.

Facilitates the future publication / distribution of collected information
I do not understand this requirement, as the only criteria for it that I can imagine would be far better placed under the following topic.

(Could refer to being able to easily retrieve information for sketches, articles & books.)

Records complete sources for each document
Proper recording of the source for all your documents is very important. If the document is a copy, then you should record the location and work where that document came from. Both the location and the work should be very specific, allowing a complete stranger to both find the work, and the reference inside that work. Examples:
 * location : The site or organization you got the work from. The full name and address should be specified. Try to remember that not everyone is from the same country as you, and to include the country in the address as well.
 * Boston Public Library, McKim Building, 700 Boylston Street, Copley Square, Boston, MA 02116 US
 * Calvary Cemetary, 686 Fond du Lac Ave, Fond du Lac, WI 54935 US
 * All Saints Church, Hertford, England, UK

Examples:
 * work : The publication you are referencing. You should include the work, volume, page, and maybe even the line that your information came from. Include ranges as appropriate.
 * 1973 Brattleboro, VT phone book, page 132, second column, line 14
 * All Saints Marriage Register, volume covering 1822-1927, March 1824

Since genealogical records are often not commonly available, it doesn't hurt to include pointers to documents which are not available to the general public. For example, the only reference to an ancestor might be a birth or marriage record in an old family bible. In that case, an appropriate reference might look like this:
 * Written on flyleaf of Surname family bible, in custody of Jane Surname, 123 Streetname, City, Country.

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

title: Genealogy/Hardcopy


text:
Cookbook:Xanthan Gum

Xanthan gum is a natural product created during fermentation of sugar by Xanthomonas campestris bacteria. It is a polysaccharide and packaged as a dry, white powder.

Xanthan gum has a wide number of food and industrial uses. In cooking it is used as an emulsifier and to modify the viscoscity of mixtures.

title: Cookbook:Xanthan Gum


text:
User talk:210.249.11.171

Thank you for experimenting with Wikibooks. Your test worked, and has now been removed. Please read Welcome, newcomers for an overview of what the Wikibooks project is and our editing practices, and please feel free to experiment in the sandbox. Gentgeen 04:55, 13 Sep 2004 (UTC)

title: User talk:210.249.11.171


text:
Ecology/Practical Ecology

Practical Vegetation Sampling
Done using the National Vegetation Classification (NVC) survey.

US System

UK System

The National Vegetation Classification is a system of classifying natural habitat types according to the vegetation they contain. Different systems exist in different countries, including the United States and the United Kingdom. A large scientific meeting of ecologists, botanists, and other related professionals in the United Kingdom resulted in the publication of a compendium of five books ISBN 0521797160 by Cambridge University Press which detail the incidence of plant species in 5 major habitat types in the United Kingdom natural environment. They are the first systematic and comprehensive account of the vegetation types of this country. They cover all natural, semi-natural and major artificial habitats in Great Britain (but not Northern Ireland), representing the fruits of fifteen years of research by leading plant ecologists. From the data collated from the books was developed a commercial software product called 'MATCH' which helps to classify vegetation identified into one of the many habitat types found in Great Britain.

title: Ecology/Practical Ecology


text:
Embedded Systems/8051 Microcontroller

The Intel 8051 microcontroller is one of the most popular general purpose microcontrollers in use today. The success of the Intel 8051 spawned a number of clones, which are collectively referred to as the MCS-51 family of microcontrollers, which includes chips from vendors such as Atmel, Philips, Infineon, and Texas Instruments.

About 8051
The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The Short and Standard chips are often available in DIP (dual in-line package) form, but the Extended 8051 models often have a different form factor, and are not "drop-in compatible". All these things are called 8051 because they can all be programmed using 8051 assembly language, and they all share certain features (although the different models all have their own special features).

Some of the features that have made the 8051 popular are:
 * 4 KB on chip program memory.
 * 128 bytes on chip data memory(RAM)
 * 32 bytes devoted to register banks
 * 16 bytes of bit-addressable memory
 * 80 bytes of general-purpose memory
 * 4 reg banks.
 * 128 user defined software flags.
 * 8-bit data bus
 * 16-bit address bus
 * 16 bit timers (usually 2, but may have more, or less).
 * 3 internal and 2 external interrupts.
 * Bit as well as byte addressable RAM area of 16 bytes.
 * Four 8-bit ports, (short models have two 8-bit ports).
 * 16-bit program counter and data pointer.
 * 1 Microsecond instruction cycle with 12 MHz Crystal.

Variants of the 8051 may also have a number of special, model-specific features, such as UART, ADC, Op_Amps, etc., making it an even more powerful microcontroller.

Typical applications
8051 chips are used in a wide variety of control systems, telecom applications, robotics as well as in the automotive industry. By some estimations, 8051 family chips make up over 50% of the embedded chip market.

Basic Pins
PIN 9: PIN 9 is the reset pin which is used to reset the microcontroller’s internal registers and ports upon starting up. (Pin should be held high for 2 machine cycles.)

PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to only connect a crystal at these pins to provide clock pulses to the circuit.

PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051 chip needs +5V 500mA to function properly, although there are lower powered versions like the Atmel 2051 which is a scaled down version of the 8051 which runs on +3V.

PINS 29, 30 & 31: As described in the features of the 8051, this chip contains a built-in flash memory. In order to program this we need to supply a voltage of +12V at pin 31. If external memory is connected then PIN 31, also called EA/VPP, should be connected to ground to indicate the presence of external memory. PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected.We will deal with this in depth in the later chapters. PIN 29 is called PSEN. This is "program store enable". In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins.

Pin 29: If we use an external ROM then it should have a logic 0 which indicates Micro controller to read data from memory.

Pin 30: This Pin is used for ALE that is Address Latch Enable. If we use multiple memory chips then this pin is used to distinguish between them.It is activated periodically with a constant rate of 1/6th of oscillator frequency. This Pin also gives program pulse input during programming of EPROM.

Pin 31: If we have to use multiple memories then by applying logic 1 to this pin instructs Micro controller to read data from both memories first internal and afterwards external.

Ports
There are 4 8-bit ports: P0, P1, P2 and P3.

PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage.The port 1 output buffers can sink/source four TTL inputs. When 1s are written to portn1 pins are pulled high by the internal pull-ups and can be used as inputs.

PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access.

PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8-A15, as can be seen from fig 1.1

PORT P0 (pins 32 to 39) PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-AD7, as can be seen from fig 1.1

PORT P10: asynchronous communication input or Serial synchronous communication output.

PIN 11: Serial Asynchronous Communication Output or Serial Synchronous Communication clock Output.

Oscillator Circuits
The 8051 requires an external oscillator circuit. The oscillator circuit usually runs around 12 MHz, although the 8051 (depending on which specific model) is capable of running at a maximum of 40 MHz. Each machine cycle in the 8051 is 12 clock cycles, giving an effective cycle rate at 1 MHz (for a 12 MHz clock) to 3.33 MHz (for the maximum 40 MHz clock). The oscillator circuit generates the clock pulses so that all internal operations are synchronized.

One machine cycle has 6 states. One state is 2 T-states. Therefore one machine cycle is 12 T-states. Time to execute an instruction is found by multiplying C by 12 and dividing product by Crystal frequency.
 * T=(C*12d)/crystal frequency

Data and Program Memory
The 8051 Microcontroller can be programmed in PL/M, 8051 Assembly, C and a number of other high-level languages. Some compilers even have support for compiling C++ for an 8051.

Program memory in the 8051 is read-only, while the data memory is considered to be read/write accessible. When stored on EEPROM or Flash, the program memory can be rewritten when the microcontroller is in the special programmer circuit or, if not using a 8031, through a preinstalled bootloader.

Program Start Address
The 8051 starts executing program instructions from address 0000 in the program memory.

Special Function Register
The Special Function Register (SFR) is the upper area of addressable memory, from address 0x80 to 0xFF. A, B, PSW, DPTR are called SFR.This area of memory cannot be used for data or program storage, but is instead a series of memory-mapped ports and registers. All port input and output can therefore be performed by memory mov operations on specified addresses in the SFR. Also, different status registers are mapped into the SFR, for use in checking the status of the 8051, and changing some operational parameters of the 8051.

General Purpose Registers
The 8051 has 4 selectable banks of 8 addressable 8-bit registers, R0 to R7. This means that there are essentially 32 available general purpose registers, although only 8 (one bank) can be directly accessed at a time. To access the other banks, we need to change the current bank number in the flag register.

A and B Registers
The A register is located in the SFR memory location 0xE0. The A register works in a similar fashion to the AX register of x86 processors. The A register is called the accumulator, and by default it receives the result of all arithmetic operations. The B register is used in a similar manner, except that it can receive the extended answers from the multiply and divide operations. When not being used for multiplication and Division, the B register is available as an extra general-purpose register. The A and B registers can store up to 8-bits of data each.

title: Embedded Systems/8051 Microcontroller


text:
Pro Engineer/Surface FAQ

What is the difference between a surface model and a solid model?

 A surface can be open e.g. it does not completely enclose a volume A surface has no thickness A solid is a special type of surface model. The CAD system knows where the inside is. Therefore, the CAD system will know whether a given point in space is inside or outside of the solid.  Solids can be created from closed surfaces Thin solid can be produced from most surfaces

Is there a need for surfaces?

There are lots of geometry shapes that cannot be produced any other way. Surfaces are a cleaner way to produce certain types of feature.

Are surfaces difficult to master?

Not really. Once you understand the terminology the are no more difficult that than solid features, in fact extrude, revolve, blend and sweep are created in exactly the same way as their solid counterparts.

What are the Magenta and Yellow lines in Pro/ENGINEER 2001 and earlier?

In wireframe and hidden line views, surfaces are displayed with tangential edges as magenta (double-sided surfaces). Surface edges, cuts, are displayed as yellow (single-sided surfaces).

How do I stop surfaces cluttering the screen?

If you use automatic layers then blank the surface layer. If you use manual layers create a layer, add the surfaces to the layers using the Feature, All of Type option, then blank that layer.

title: Pro Engineer/Surface FAQ


text:
Pro Engineer/Surface Tips

Symmetrical Models When creating symmetrical surface models only model half and transform, mirror it. Use insert mode to add features before the mirror feature.

Merging Merge surfaces at the end of the model where possible, the model will be more robust.

Avoid 2 and 3 sided boundary surfaces Avoid using 2 and 3 sided boundary surfaces. Use 4 boundaries to get the best quality surfaces in pro/engineer otherwise downstream features such as solids and offsets may not work correctly. see Surfaces:Avoiding 3 sided boundaries

Do not use boundary surfaces to create flat surfaces Using boundary surfaces to create flat surfaces will not result in perfectly flat surfaces.

Tips for creating datum curves for use with boundary surfaces Avoid 2 projection curves as it is almost impossible to control the tangency conditions at the curve ends. If 2 projections are used try to line up intersections of the sub curves, otherwise the resulting curves will have lots of segments.

Avoid curve intersecting surfaces for the same reason.

Try to use curve, thru points because you can control the tangency of the curve. It is also possible to tweak the curve and pull it into the right shape. Or use a curve from ISDX as a single feature.

When creating curves for the 'same dir' of a boundary surface try to create it with a similar number of segments. This can be achieved by using divide in sketcher.

Build the datum curves with the same tangency conditions as required in the boundary surfaces.

When creating splines (and ISDX curves) use the minimum number of points, this reduces the risks of introducing ripples into the curve. (unless of course you want ripples!)

Use colours Set surfaces to a shiny black as this shows up the shape of reflected highlights. The outline of highlights should be smooth if not the surface is probably not smooth.

title: Pro Engineer/Surface Tips


text:
Pro Engineer/Family Table Tips

Name Features Name features/ dimensions used on family tables. This makes the family table easier to understand and modify.  Automatic Suppression Suppressing a feature or component using family table will suppress all children automatically.  Create features in instances Creating features in an instance will automatically suppress the feature/ component in the generic and add the items to the family table.  Don't use the generic as an instance Create an instance for each model required e.g one for casting, one for machining: avoid creating one instance (machining) and then using the generic as the casting instance.  Tolerances can be added to family table Display tolerances, Family Table, Add Item, Dimension pick the required dimension and the tolerance figures.  Add parameters instead of dimensions Adding parameters to the family table instead of dimension enable you to drive many dimensions/ features from a single column in the family table. e.g. a bolt family with different bolt heads, the thickness of the head can be driven by one parameter (head_thickness) instead of adding a dimension for each type of bolt head. Each bolt head thickness dimension has the relation d**=head_thickness.  Patterns Complex features such as patterns can be added either by adding individual pattern dimensions or by adding pattern tables to the family table.  Reduce generic part load time
If a feature/component is only used in a few instances suppress that feature/component in the generic to reduce load/regeneration times. Generic assemblies could have all components suppressed in the generic. Parts can also have all features suppressed in the generic. Features and components are then added at the instance level.
 Create the family table at the end
Each instance has to be regenerated after certain operations, this can cause long regenerations. Complete the majority of features before constructing the family table.
 Verify
Always verify a family table before saving to Intralink. Intralink will issue a warning if instances are not verified
 Don't leave default values in family table
Fill in all values do not leave * (the * denotes the value will be the same as the generic) in the family table otherwise instances may change unintentionally when the generic is modified.
 Reorder Features
Reorder the features that change via the family table to be as late as possible in the model tree - this will improve performance and regeneration.

title: Pro Engineer/Family Table Tips


text:
Pro Engineer/Pro Intralink Tips

Configuration

Remove search paths and search.pro from pro/engineer configuration files (both local and global config files)

Remove PRO_FORMAT_DIR from the config.pro. Check out formats from commonspace.

File Manipulation

Never try to manipulate files at the operating system level.

Only use Pro/engineer linked to Intralink to open and modify Intralink controlled files.

Clean temporary files from start up directory

Check In and Check Out

Check in the latest version of an object when someone else needs it.

Check files in regularly. This will store a design history and the file will be backed up.

Administrators should set access to the root directory as read only to force users to set a destination directory.

Only check in the files you intended to change - review the checkin form and remove any that should not have been modified.

Family Tables

Check out the generic and all instances before the modification of family table driven parts.

Verify family tables before checking in to Intralink.

Workspace

Create a new workspace for each new task. When finished delete the workspace. This will reduce disk usage and minimise 'check in' conflicts.

Check the status of an object before working on it. This will avoid check in conflicts and having to use Integrate.

Frames

Turn on frames. This will enable you to undo mistakes easily.

Pro/Engineer

Use Intralink to rename objects it is safer than Pro/Engineer as Pro/Engineer will only update objects that are in session. Intralink will update all objects it knows about.

Viewing Objects Without Opening Pro/Engineer

Highlight the object (drawing, part or assembly) click Object, Information a preview of the object is shown in a small window. Click the upward arrow to show the image full size. 3D objects in the small image and large window can be rotated by holding down the middle mouse button and moving the mouse. Holding down the ctrl + MMB zooms the object and shift + MMB pans the object.

title: Pro Engineer/Pro Intralink Tips


text:
Template:Ed

[ edit ]

title: Template:Ed


text:
User:Solkoll~enwikibooks

WIKIng Solkoll is a writer, (and sysop) in the swedish wikibooks. I will help out some in the swedish dictionary if you guys need it. Don't be afraid to ask if there is something you would like to know about the language.

sv:Användare:Solkoll

title: User:Solkoll~enwikibooks


text:
Portuguese/Contents/Variation of the Portuguese Verbs

<< Portuguese:Contents

Verbs are the most variable words in the Portuguese Language, so they are much more complex than the English verbs. Portuguese verbs vary on mood, tense, voice, number and aspect.

Mood
Any verb that expresses a desire in some form can be used to introduce the subjunctive. Doubt, denial, emotion, wish, hope, suggestion, certainty, supposition, recommendation are other examples. It is also used after indirect commands. In Portugal, the subjunctive (subjunctivo) is called the conjunctive (conjuntivo). (More details below).

The Indicative Mood is the opposite and refers to statements of fact or certainty.

The Imperative Mood is used for commands.

Tense
The present, preterite, and future tenses refer to a fact that is occurring in the moment in which one is speaking, before the moment in which one is speaking, or after the moment in which one is speaking, respectively.

Aspect
The aspect is the speaker's point of view of the action expressed by the verb. The word Imperfect comes from the Latin "imperfectum" which means not completed. This is often a source of confusion when studying Portuguese because this has no relation at all with what is considered the imperfect aspect of a verb.

Mood, Tense, and Aspect
The following table explains each of the moods, tenses and aspects of Portuguese verbs. The first four columns represents a typology often found in Portuguese grammar books. As they are best understood when they are used together, the following table displays all the variations1:

1 There are some special treatments of participles (see below). 2 The future subjunctive is formed by taking the 3rd person past tense form of any verb and dropping the "am". For the 1st person plural add "mos" and for the 3rd person plural add "em".

More on the Subjunctive Mood
WikiPedia Subjunctive Mood Article

WikiPedia Portuguese Grammar Article

GENERAL RULES:

It is first important to understand the difference between a main clause and subordinate clause in order to understand when the subjunctive is used. More on clauses can be found here. Usually the subordinate clause is used after que, other conjunctions (e.g. embora, porque, se, quando, etc.) or relative pronouns (cujo, quem, qual, onde, etc.).

 * The subjunctive is used in the main clause when the verb in the clause expresses a curse or a wish or when it begins with the word "maybe" (talvez)
 * Any wish, intention or purpose in the main clause that expresses the desire to influence the action in the subordinate clause necessitates the use of the subjunctive.
 * When the verb in the main clause expresses denial, doubt or uncertainty, presupposition, or emotion about the action in the subordinate clause, the verb in the subordinate clause must use the subjunctive.
 * Certain conjunctions introducing a subordinate clause require the indicative to be used in the subordinate clause (e.g. visto que (given that), porque (because), dado que (given that), ja que (now that), assim como (in the same way that)). Others require the use of the subjunctive.  (e.g. the following require the use of the present or imperfect subjunctive: caso (in case), antes que (before), ainda que/posto que (although or even if), unless (a nao ser que or a menos que), a que (to), in order to (a fim de que), unless or without (sem que), para que (so that, in order to), even if (mesmo que, nem que), although (embora), provided that (contanto que), as soon as (logo que/assim que)).
 * You can use the indicative or the subjunctive in sentences where the following verbs are negated (preceded by nao): achar, crer, sonhar, revelar, mencionar, alegar, aununciar, confirmar, comunicar, contar, informar.

SOME SPECIFICS BASED ON THE GENERAL RULES:

 * If the verb in the main clause is in the indirect command form or expressing desire or emotion in the present, the verb in the subordinate clause will be in the present subjunctive.

 * I hope (desejo: present indicative) that you accompany (acompanhem: present subjunctive) me.  – these are indirect commands or verbs that express a desire or emotion somewhow.  They require the use of the present subjunctive after them (e.g. I hope that…, I want that…, I need that…, I suggest that..., I recommend that..., I insist in that..., I permit that, It is important that..., It is better that..., It's a pity that..., It's sad that...It's ridiculous that..., It's strange that..., I'm upset that..., I deny that...).

 * Use with verbs such as sugerir (to suggest), permitir (to permit), recomendar (to recomend), insistir em (to insist), É preciso que... (it is nesscessary that), É importante que...(it is important that), É melhor que... (it is better that) and others.

 * If the verb in the main clause is in the present or imperative, the verb in the subordinate clause will be in the present subjunctive or the imperfect subjunctive depending on whether the verb in the main clause refers to a present event or a past one respectively.

 * I doubt (duvido: present indicative) that they speak (falem: present subjunctive) very well. – This refers to a present situation so the present subjunctive is used.

 * They doubt (duvidam: present indicative) that my mother was (estivesse: imperfect subjunctive) at the house. – This refers to a past situation so the imperfect subjunctive is used.

 * Study (estude: imperative) now so that you can learn (aprenda: present subjunctive) more Portuguese.

 * The imperfect subjunctive or pluperfect subjunctive is used after "como se" (as if).

 * My friend was speaking (falava: imperfect indicative) as if he was (fosse: imperfect subjunctive) an important person.

 * They speak (falam: present indicative) as if they are (fossem: imperfect subjunctive) lawyers.

 * My sister ate (comeu: preterite indicative) as if she hadn't eaten (tivesse comido: pluperfect subjunctive) in three years.

 * If the verb in the main clause is in the future, the verb in the subordinate clause will be in the present subjunctive or the future subjunctive.

 * Before I see (veja: present subjunctive) him, I will tell (direi: future indicative) my husband everything.

 * When she comes (vier: future subjunctive), I will be (estarei: future indicative) in California.

 * When the if-clause refers to a future occurrence, the future subjunctive is used in the if-clause:

 * If I have (tiver: future subjunctive) a boyfriend, I will take (farei: future indicative) him to brazil.
 * If you can (puder: future subjunctive), arrive (chegue: present subjunctive) as late as possible to the party.

 * "While" followed by a reference to a future situation requires future subjunctive in the while-clause.

 * While you are (estiver: future subjunctive) not feeling well, stay (fique: present subjunctive) with me.

 * Doubt about a present reality sometimes necessitates the future subjunctive:

 * I'm not sure if you want to or not (...se voce quiser...)
 * I'm not sure if you can or not. (...se voce puder...)
 * If she prefers... (Se ela preferir...)
 * As you wish...(Como voce quiser...)
 * Wherever you wish....(Onde voce quiser)

 * "When" followed by a reference to a future situation requires future subjunctive in the when-clause:

 * When you know (souber: future subjunctive) the day of the test, tell (diga: present subjunctive) me.

 * The translation of wherever, whenever, whoever, and whatever require the use of the Future Subjunctive:

 * You can love whoever you wish (quiseres: future subjunctive).

 * The future subjunctive is also used with "as soon as you wish" (assim que quiseres/logo que) and "as you wish" (como quiseres).

 * If the verb in the main clause is in the past (e.g. preterite indicative, imperfect indicative) or the simple conditional, the verb in the subordinate clause will be in the imperfect or the past perfect.

 * I would like you (queria: conditional) to have dinner (viesses jantar: imperfect subjunctive) with me tomorrow or next week.

 * I wanted (quis: preterite indicative) you to have dinner (viesses jantar: imperfect subjunctive) with me last week.

 * I didn’t believe (acreditei: preterite indicative) that he had sold (tivesse vendido: past perfect subjunctive) everything.

 * I wanted (desejava: imperfect indicative) him to be (estivesse: imperfect subjunctive) with me everywhere.

 * If the "if" condition can't be met (i.e. doesn't imply a real fact) and the sentence refers to a present situation, the imperfect subjunctive is used in the if clause and the conditional or imperfect indicative is used in the main clause:

 * If I had (tivesse: imperfect subjunctive), I would take (faria or fazia: conditional or imperfect indicative) a vacation in Rio de Janeiro.

 * If the "if" condition can't be met (i.e. doesn't imply a real fact) and the sentence refers to a past situation (what could have been), the past perfect subjunctive is used in the if-clause and the conditional perfect (or simple pluperfect indicative) in the main clause:

 * If I had had (tivesse tido: past perfect subjunctive) a girlfriend, I would have taken (teria feito or tinha feito: conditional perfect or pluperfect indicative) her to Brazil.

More on Participles
The verb forms with participles are those with "estudado" listed above. Here are two important topics regarding participles:

 * The participle stays the same in the active voice (like #1) but agrees with the subject in the passive voice (#2 and #4) except when using the passive voice with ter or haver (#3, #5, #6).

 * 1) A professora ja tinha ido.
 * 2) Algumas pessoas foram atingidas pelo meu carro.
 * 3) Os cavalos nos quais eu tinha andado estavam vividos.
 * 4) A rua foi feita um ano atras.
 * 5) Os problemas tinham partido da minha alma.
 * 6) A carta que eu havia escrito foi longa.

 * Some verbs have two participle forms. Examples of verbs with two participles are:

aceitar - aceitado - aceito acender - acendido - aceso contundir - contundido - contuso eleger - elegido - eleito entregar - entregado - entregue enxugar - enxugado - enxuto expulsar - expulsado - expulso imprimir - imprimido - impresso limpar - limpado - limpo murchar - murchado - murcho suspender - suspendido - suspenso tingir - tingido - tinto findar - findado - findo isentar - isentado - isento matar - matado - morto salvar - salvado - salvo segurar - segurado - seguro soltar - soltado - solto benzer - benzido - bento morrer - morrido - morto prender - prendido - preso suspender - suspendido - suspenso emergir - emergido - emerso expelir - expelido - expulso exprimir - exprimido - expresso inserir - inserido - inserto omitir - omitido - omisso submergir - submergido - submerso juntar - juntado - junto trazer - trazido - trago

 * ter/haver in front of the verb to form the perfect tenses use the first form (e.g. juntado).
 * ser/estar in front of the verb (more adjectivial in nature) use the second form (e.g. junto).

Nominal Forms
These are forms of a verb that are characterized by not having an indication of time or of mood depending always on the context in which they're found. In these nominal forms, the verbs can themselves function as nouns, adjectives, and adverbs.

More on the Infinitive:
The infinitive has many uses. The impersonal infinitive has one form: the one you see in the dictionary that ends in –ar, -er, or –ir. Here are some uses of the impersonal infinitive:

 * Driving (Dirigir) is fun. – when it is the subject of clauses
 * I need to drive (dirigir). I am going to drive (vou dirigir) – coupled with other verbs.
 * I am learning now. (estou a aprender).  This is another form of the present continuous and is the same as “estou aprendendo”.
 * I am happy being (ficar) with you. – Complementing nouns and adjectives.
 * They were forced to stop. (Eles foram forcados a parar).  – verb in the passive voice with preposition is followed by the impersonal infinitive.
 * I stated that I was prepared (disse estar preparadas) for the examination.-- When the main and subordinating clauses have the same subject.
 * And he yelled, “Stop” (Parar) – substituting for the imperative

There are also Personal Infinitives which are less used in spoken language than in writing. They are used when there are infinitive verb constructions but the subject of this verb is not very clear. Therefore the infinfitive is "personalized" to make clear who the subject is. It is formed by: INFINITIVO PESSOAL

 * Adding a subject in front of the singular infinitive forms:
 * Eu sair -- Before I leave, I want to talk to her.
 * Voce sair -- Before you leave, I want to talk to her.

 * Adding endings to the plural infinitive forms:
 * infinitive + mos for first person plural
 * infinitive + em for third person plural

Here are some uses for the personal infinitive:

 * They regret that we are (estarmos) not here. When the main and subordinating clauses have different subjects.
 * It’s necessary for me to buy (eu comprar) another car. It’s easy for them to arrive (elas chegarem) early. It’s impossible for you to leave now (voce entrar) – Used after impersonal expressions.  In these sentences “for” is not translated.
 * When they opened (Ao abrirem eles) the card, they saw the picture. Used after ate, antes de, depois de, ao (translated as when or upon), a fim de, sem, para


text:
Talk:Distributed Systems

This textbook is based on class notes from a graduate-level comparative operating systems interfaces course.

Guidelines and Direction
Each chapter should follow this pattern:

== chapter == === section == ==== exercises for section ====

Answers for the exercises belong in the (currently empty) answers appendix.

Generally, I suggest we keep the number of chapters small, but have lots of sections.

There's a C programming appendix at the end that covers some stuff people might not know about C.

pseudocode vs. real code
While functional examples are great, sometimes it's best to introduce a topic with psuedo-code.

Additionally, you may be interested in Beej's Guides, which I've found to be particuarly useful.

--Eibwen 06:59, 1 Oct 2004 (UTC)

Thanks for the Beej link! Another site I really like is this guy's, and he covers just about everything.

--Waxmop 02:36, 2 Oct 2004 (UTC)

As an experienced system programmer, functional code is best. "Pseudo-code" is basically meaningless when the objective is a simple example of an API IMO.

Named pipes and locks
Consider adding sections for named pipes and locks (eg sephamores, mutex). Granted the latter you'll probably cover in the threads section, but locks should at least be their own subsection.

--Eibwen 17:56, 25 Sep 2004 (UTC)

Yeah, I just added some example mutex code today. I'm typing this stuff in as the class progresses.

goals for this book
I would consider naming this something else than "Distributed Systems". That is far too general term for Unix thread/process intercommunication software development and TCP/IP protocols. If you really want to make a book on this subject, its not just Ethernet/TCP/IP-based distribution (message passing) - what about CANopen, Lin, Profinet, EPL, etc. Also, we are not talking about sensor networks, control systems, ...

--Mikko Laakso

I agree that *currently*, this book seems to be almost entirely about multitasking on a single box, and "distributed systems" is a much larger field.

However, I really do want a book on distributed systems. So the stuff you see on "multitasking on a single box" is merely one chapter of what I hope this book becomes.

How can I make clear that this is still a rough draft, and there are still a lot of other sections yet to be written? How can I persuade people to write those other sections?

p.s.: There currently seems to be a lot of overlap with Computer programming/Concurrent programming Parallel Computing and Computer Clusters. So I expect that someday, after both have matured a bit, that several pages from this book will be moved into those books, and a few pages from those books will be moved into this "Distributed Systems" book. --DavidCary 05:44, 20 October 2007 (UTC)

I still think this book needs a better focus to be really useful. That would help and steer writing this book as well. Focus on one, more limited, subject instead scraping the top of everything. And perhaps later, would be good to make it clear for everybody by re-inventing the name.

--Mikko Laakso

As an experienced system programmer I think this book is great. If you want to rename go for it but the content is perfect.

-- A PHD EE User in Florida, USA

high and low memory
may be unclear --Remi (talk) 02:58, 25 February 2008 (UTC)

title: Talk:Distributed Systems


text:
User:Benc~enwikibooks

My primary user page is located on the English Wikipedia: w:User:Benc (talk).

And the Tortoise said unto the Cat: "Verily I ask of thee, please do not poop in my sandbox." — ancient proverb

title: User:Benc~enwikibooks


text:
User talk:Benc~enwikibooks

 * Feel free to leave comments here, but keep in mind that I may not see your message in a timely manner. You can drop me a quick "look over here!" note at w:User talk:Benc, if it's urgent.

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Benc. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Benc~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:02, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 04:38, 19 April 2015 (UTC)

title: User talk:Benc~enwikibooks


text:
Cell Biology/Nucleus

In cell biology, the nucleus is an organelle, found in most eukaryotic cells. The nucleus contains the cell's genetic material as DNA. Nuclei have two primary functions: to control chemical reactions within the cytoplasm and to store information needed for cellular division.

title: Cell Biology/Nucleus


text:
User:Lobster

Developer of the Tmxxine project to create Open Source Time Travel

 * 1) Tmxxine

Created the following wikibooks

 * 1) Computer Know How
 * 2) Freeware
 * 3) Nasrudin
 * 4) Sufism
 * 5) Alchemy
 * 6) Buddhist Philosophy

title: User:Lobster


text:
The Voynich Manuscript/John Stojko

Use the above given alphabet to read the whole VMs. If for any reason it is decided to reverse the transliteration than remove the vowels and replace the consonants with VMs alphabet given in table above. Although if you will be more comfortable to work with English alphabet you can replace Ukrainian consonants with English using the above given alphabet table. Or you can replace my transliteration in Ukrainian with English alphabet. To do that use alphabet table above for consonant and for vowels and correct phonetic value of the words use table in my Home Page http://home.att.net/~oko/home.htm To obtain meaning of Ukrainian words in English use Ukrainian – English dictionary. Except for names you will find meaning for all the words used in VMs. Bellow is given translation of page 18R.

18R in Ukrainian ф\ 1. Що Око робе заре косе? Хиба Орів хапа. Був, бору і суть повіли. Око боре в злі. Попита се. Ви пита віру Кагалу?

2.  Вість одновили і світу повіли. Пише то пишу. Ви те побили Око божиє косе.Повіло Око Бозйа.

3.  У свьату по вірі повір і повіта нашу віру і панусьу. Свьаті повіли косо. Се што поборе зло? 4. По вірі поставе Орі і увітеа онову Ора. Се то повіли ви та Бозя.

5. Што повірі повіру у пусті божиї. Пусто вола половили і повезли.

6. Се пишу то повір. Хиба заре се што вола попустиш. Око боре, Ока бере і Око було.

7. В одновір одне божиє. Пошто се повіла? Око вола, вала косо, хвали Око божиє.

8. Свьата по вірі пита волі. Вольа в Коси. Ви то були коси а Око береш.

9.  Повіли і попусту були. Ви то одні були і пише та булака.

10. Око боре одну віру. Се ви то повіли? Волі се Око божиє?

11. Де в Степу бажає. Пові та пиши. Попита вольу по вірі Коса.

12. Усі по базару поставили. Око божиє і Свьата пише пусте се.

13. Віру одну бажайе пустовіри. Пусті були ви та буле у Око бере.

14. Се Понті пиши та побажай.

18R in English 1. What slanted Oko is doing now? Perhaps Ora’s people you are snatching. I was, I am fighting and told the truth. Oko you are fighting mischievously (evil manner). Ask this. Are you asking religion for your clan?

2. We renewed the information (news) and told to the world. He wrote and I am writing. You broke this slanted eye of God. Oko Bozia (Baby God) answered.

3. In believe she is holy and you should believe and welcome our religion and Miss. The holy told in slanted way. Is that the evil that will be victorious?

4. In religion we decide for Ora and Ora will welcome the renovation. What a news you and Bozia told.

5. That in religion I will believe in god’s emptiness. Empty (vain) is your calling, we caught (snatched) and carted away.

6. What I am writing you should believe. Perhaps now that what you are calling you will relinquish, Oko is fighting, Oko is victorious and Oko was.

7. In one religion only one is gods. For what reason Kosa (slant) is telling us? Oko is calling slanted, praise the God’s Oko.

8. In believe her holiness is asking for freedom. Kosa has the freedom. You were slants and now you are taking Oko.

9. You are saying but you were idlers. You were alone but you are writing and talking.

10. Oko is fighting for one religion. You told this. Do you won’t this God’s Oko?

11. Where do you wont in Steppe? Tell and write. Kosa should ask for freedom in religion.

12. Every one was vain in the marked place. God’s Oko and (she) holy one is writing this emptiness.

13. Vain believers are wishing one religion. You are vain therefore you are taking Oko that was.

14. Write this to Pontia and wish him.

Now please read the meaning of the VMs in English or if you speak Ukrainian in Ukrainian. After reading you will and you should make conclusion what is this all about. I do not know what your conclusion will be but I believe that I should explain my understanding of the VMs text. Some one in authority received letter and he reads and dictates to his scribe what answer he should write. From time to time he gives phrases from his letter that provoked the other side response and than give phrase what he desired in the answer. For example: I will take line 1. 1. In his letter he wrote “What slanted Oko is doing now?” And than gives his answer, “Perhaps Ora’s people you are snatching”. He received the following answer, “I was, I am fighting and I told the truth”. Now he wants the scribe to write in this answer “Oko you are fighting mischievously (in evil manner). And than he order the scribe “Ask this” and give the phrase “Are you asking religion for your clan?”

After reading the letter and stating to the scribe what he want to be included in the answer, he gives the following order. See line 14. “Write this to Pontia and wish him”

From the other pages in VMs where is stated that Pontia was Median King or general that come with his army to help Miss Mania Koza and her son Sus to fight Ora’s army. When the VMs were written is not known. But it is good indication that VMs was written at the time when Media was strong and the King of Media or general Pontia was known for his glory in history. The Black Sea was named after him. The Greek to the present time call Black Sea Pontus. I doubt that the original notes of the scribe survived in its original form. It seems that the original notes were rewritten. If the VMs were original it would be written by the same hand writing. Although I am not hand writing expert however, I do recognize more than one hand writing. Who and when the VMs was rewritten, probably we will never know. But it can be stated that, at that time it was known what it contain. Also they knew the alphabet and language in which the VMs were written.

Whether the original was in poor shape or the political time dictated. That the writing should be preserved for the future. It was rewritten and the pictures were added for deceptions. That I do know. Many hours I spent trying to decipher to decipher looking for name or clue in the pictures. When I succeeded deciphering the alphabet and started to read than I realized that the writing has nothing to do with the pictures. Yes, it is ingenious deception to mask true contents in VMs.

title: The Voynich Manuscript/John Stojko


text:
User:Mad dr~enwikibooks

i'm working at Hebrew Wikibooks - ויקיספר

mad dr

title: User:Mad dr~enwikibooks


text:
Serial Programming/Modems and AT Commands

General
This content is part of the Serial Programming book. It covers the programming of Hayes and Hayes-compatible telephone modems. Such types of modems are the norm in consumer applications, as well as many professional applications - basically, wherever modems are still used.

Modem programming is slowly becoming a lost art, particularly with the widespread migration of users from dial-up lines to DSL for very obvious performance reasons. Nevertheless, modems are used for many applications. In recent times, modems can be found in new areas where they were previously not seen. For example, embedded modems in machines are used to automatically "call home" to the manufacturer in case the machine is in need of some service. Often this is done via a wireless phone system, where the wireless module still provides a Hayes-compatible interface for dialing and data transmission.

The original Hayes modem command set is exclusively used as a reference in this module. Vendor specific extensions are not covered, and do not belong into this module. The module explains the origin of the term Hayes, and the related AT commands. It also includes some principal information about what a modem is, and how the signaling with a modem happens. The module then continues with a description of the basics of modem programming, including the set-up of a development environment.

Further, the module provides detailed (but incomplete) programming information, and an incomplete reference of the original Hayes command set and registers.

Administrative Information
This section particularly addresses potential authors. Please note:

 * This module is not a dumping ground for random modem programming information and folklore.
 * This module is operating-system–agnostic. The Programming Serial Data Communications book provides other modules for such information.
 * This module deals with generic Hayes modems, not with any vendor-specific extensions. If you really want to see your particular love-child covered, provide an Appendix with that vendor-/brand-specific information.
 * Do not assume that just because something works on your particular modem it is the standard and other modems do it the same way. If you have no firsthand experience that something is done the same way on "almost" all Hayes-compatible modems, then leave it out, or mark it at least as doubtful.

The reason why this module sticks with the original Hayes command set is to have a defined boundary. This module is not intended as a reference manual. Once someone has mastered the basic set, and implemented the code, it is rather straightforward to deal with vendor-specific extensions. Other extensions, e.g. the very rough and basic FAX extensions, require some deep insight into the involved protocols (e.g. in the case of FAX the detailed encoding, compression and timing of fax data on the phone line). This is out of the scope of this book. If you know how to handle the FAX extensions, write your own book.

What is Hayes?
Hayes Microcomputer Products, Inc. was a modem manufacturer from the beginning of the 1980s until the end of the 1990s, with its heyday in the early '90s. The name Hayes still exists as a brand name, owned by Zoom Telephonics, Inc. (as of Fall 2004).

In 1981, Hayes developed the Hayes Smartmodem. This was a unique product at the time, because this modem was no longer simply a "dumb" device blindly converting serial data to and from audio tones, but contained some "intelligence". It was possible to send commands to the modem to configure it, to execute certain operations (such as dialling a number, quieting the speaker, hanging up, etc.), and to read the current status of the connection. Hayes developed and published a command set to control the modem over a serial line. This command set became popular among consumer modem manufacturers, and was cloned by many different manufacturers. Known as both the "Hayes command set" and the "AT command set", it has long been the de facto standard for controlling consumer modems and also many professional modems. Modems which support this command set are called Hayes-compatible.

The commands were standardised at some point in time, however, as it is typical with standards, there are several standards. Plus, of course, there are still vendor-specific extensions and implementations in different modems vary slightly. Some of these enhancements were required to support at that time emerging features, such as data compression and FAX support. As a result, the command sets of modern modems are not fully compatible with each other. The original Hayes commands, however, should still work, and still form the core of almost all consumer modem command sets.

The basic set of commands was at some point in time standardised as TIA/EIA-602 and the syntax as EIA/TIA-615. But as already mentioned, modem manufacturers added their extensions. A larger extended set, particular under the pressure from cell phone manufacturers, was standardised as ITU V.250 (old name V.25ter). That one usually forms the base for professional Hayes-compatible modems, and cell phones with build in data modems. ITU V.250 further referes to a bunch of other standards (e.g. V.251, V.252, V.253) for particular applications and extensions, and also has some supplements. Plus, of course there are the many standards defining other aspects of a modem, like compression and transmission.

See Also:
 * Hayes Communications
 * Transferring Data between Standard Dial-Up Modems

What are AT Commands?
Almost all of the Hayes modem commands start with the two letter sequence  - for getting the modem's attention. Because of this, modem commands are often called AT Commands. This still holds for many of the manufacturer specific command set extensions. Most of them also start with, and are called AT Commands, too. Please note, that just because an AT command contains a & does not make it an extensions. & commands were already part of the original Hayes command set.

The exact usage of the term AT command set slightly varies from manufacturer to manufacturer, often subject to marketing blurbs. In general, it can be assumed that a modem with an AT command set

 * uses commands mostly starting with ,
 * uses the original Hayes way of separating data and commands, and
 * supports the original Hayes commands and register settings as a subset.

What is a Modem?
A modem in the classic sense is a modulator/demodulator for transmitting digital information over analog wires, such as the analog telephone system's two-wire or four-wire lines. The term has come to be used as acceptable slang for many communication devices used to link a computer to either another computer, or a wide-area network (WAN). For example, the Ricochet radio data transceivers were commonly known as "Ricochet modems".

This module deals with the classic type of smart modems, designed to convert data from/to a serial interface to/from an analog line. The module also applies to modems which provide the classic serial interface but connect over a different physical layer, such as a digital line, as well as devices providing a serial modem-like interface for other purposes. For our purpose, the modem is a classic DCE (data communications equipment) device, controlled via serial line by a classic DTE (data terminal equipment) device (such as a computer).

Depending on the type of modem, the modem can use a number of different technologies and speeds to transmit the data over the analog line. The details of these technologies are of no particular interest here, other than to note that it is possible with most modems to specify these communication parameters (for example, to disable compression, or to change modulation techniques). The data this module deals with is not the data on the analog line, but the data as it appears on the serial interface between the DTE and DCE. I.e. the data as read and written by a device like a computer.

(Smart) Modems also provide auxiliary services, such as dialling a particular number to set up a connection. As a consequence, a modem can be in a number of different states and modes, which are not always orthogonal. It is possible, for example, for a modem to be in the command mode while still keeping a connection (see the  sequence for details).

Non-smart modems had to rely on other equipment like an ACU (automatic call unit) to provide these auxiliary services, but they are practically extinct today.

Inband Signalling
The original RS232C/V.24 specification contained a TX wire for transmitting data and a RX wire for receiving data, and other completely separate wires for transmitting control information between the DTE and DCE, the idea being to separate data and control information. In telecommunication jargon this is called outband signalling.

Hayes-compatible modems use almost none of these RS232C/V.24 features. Instead, communication with the modem is done almost exclusively via the same RX/TX lines which are used for transferring the data. This mechanism is called inband signalling.

Inband signalling has significant disadvantages. At any point in time, both the DTE and DCE must know if information sent or received via the TX and RX lines is for signalling purposes, or if it is data, which should be handled transparently. Therefore, the DTE and DCE must operate in sync. If they get out of sync, either data will be lost, data will be incorrectly interpreted as commands, or signalling information will be interpreted as data, effectively destroying the original data.

Inband signalling has the advantage that the wiring between the DTE and DCE is simpler, and also that, at least at first glance, the communication software in the DTE is simpler.

As it has been said, Hayes-compatible modems use almost none of the RS232 control lines. But only almost. For example, they often drive DCD (data carrier detect). This, however creates the situation that modem-driving software now has to take care not only of the inband, but also the outband signalling with a modem. This slightly complicates the communication software's state machine.

Further, especially with the rise of cell phone modems, manufacturers have again started to introduce more outband signaling. Such modems provide multiple virtual serial interfaces. Some of these interfaces are exclusively dedicated to data transport, controlled by another serial interface which is either used exclusively for signalling (i.e. outband signalling) or can still also be used in the more conventional inband signalling scenario. In such cases the communication software needs to manage even more complex states.

Command State / On-line State
With respect of controlling the modem a Hayes-compatible modem is in one of two main states:

 * Command State
 * The modem interprets data from the DTE as modem commands. The modem can be in command state while still keeping a connection with a remote party.

 * On-line State
 * The modem interprets data from the DTE as payload and transmits it to the other party. This state requires that a connection to the remote site has been established.

Inside these main states are a number of sub states. Also, with respect to other issues a modem has a number of communication states, e.g. if a remote carrier has been detected or not.

Originating Mode / Answer Mode

 * Originating mode
 * A modem in originating mode is a modem which is setting up a connection, e.g., by dialing the number of a remote station and initiating the negotiation of protocols.

 * Answer Mode
 * A modem in answer mode is a modem waiting to be contacted and ready to "answer the phone".

Command Responses
A modem is supposed to send a response for almost all commands it receives. These responses can either be in the form of ASCII strings, or numeric values. The response type can be switched with a command, but it is typical to use the ASCII responses.

Responses need to be tracked by the DTE with great care. Among other things they inform the DTE if the dialling of the remote site was successful or not, and if the modem switches from command state to on-line state or not.

Unfortunately, the set of response messages has been greatly enhanced since the original Hayes modems and are often configurable via additional  commands. It is suggested to not strictly parse response messages but to forgivingly check if they contain interesting keywords, like. It is also suggested to study the manual of a particular modem very carefully.

S-Registers
The so called S-registers are also a Hayes heritage which all Hayes-compatible modems support. They are registers in the modem which contain various settings. And like the AT commands, they have been extensively enhanced by different modem manufacturers.

The reason why they are called S-Registers is a little bit unclear. Some say the S stands for modem settings. Some say they are just called like this, because     they are set and read with  ... commands. In the common vernacular they were usually termed storage registers because they permanently stored the values even through power-off.

Several of the other  commands also change values of particular S-Registers. There is usually no difference in setting a value directly via an S-Register or via another  command. It depends on the particular situation which way of setting a register is better.

Command Reference
In order to program for an actual modem it is a rather good idea to obtain the command reference for that particular modem. Unfortunately, it has become quite common for no-name modems to ship without any kind of usable command reference. Thanks to Windows' Plug & Play feature it is no longer necessary on Windows to know the individual commands. Instead, all that is needed for a modem to run on Windows is to be shipped with the necessary  files (often hidden inside some "installer" software, and called a "driver" which is technically not the case, Windows already contains the necessary drivers).

If the modem doesn't come with a command reference the next logical step is to search the web. However, unfortunately, a lot of modem information has vanished from the surface of the earth and the web in recent years. With the rise of broadband Internet connections, modems have become old fashioned devices and many sources are no longer available. It has become more and more difficult to find basic information about particular modem types. Even for modern modems like cell phone modems it can be difficult to find the necessary information.

There are a number of alternatives to obtain a command reference if one doesn't come with the modem:

 * Maybe the distributor provides one on its website
 * Maybe the OEM manufacturer provides one. This requires to identify the OEM manufacturer. A possible way is to use the FCC number of the device, and then looking the original manufacturer up on the FCC web site.
 * Maybe the chipset manufacturer provides one. Consumer modems are often just build around "off-the-shelf" modem chipsets from larger hardware manufacturers. The cheaper the modem, the more likely it is that the modem manufacturer didn't change anything in the firmware and is using the original example software from the chipset manufacturer. Some chipset vendors provide command references for their modems.
 * By looking into the corresponding Windows  files it is possible to at least obtain the basic commands
 * By using the generic Hayes command reference in this Wikibook module.
 * Obtaining the previously mentioned standard documents if there is an indication a particular modem complies to such a command standard.
 * Using some kind of sniffer program to monitor the communication between the modem and the DTE and reverse engineering the commands using the obtained information. This requires that (a) reverse engineering is legal in your jurisdiction and (b) that there is some DTE communication software available that handles the particular modem so there is some valid communication to sniff.

Setting up a Development Environment
It is highly recommended to spend some preparation time setting up a suitable development environment before starting to write drivers or software for a modem. Most of this consists of hardware set-up.

It is suggested to set up a small network with a "remote" computer and a second modem in answer mode. "Remote" computer in this case means a computer sitting right next to the development machine, but connected via the modems. If a terminal program is being developed, the "remote" computer should run some small BBS software (for example), so there is always someone ready to answer, and/or protocol analysis/data dump software. Developing modem software without such a setup can be extremely frustrating. Such a set-up pays off a hundred times in reduced development time and lower stress. Likewise, the modems used should have real speakers, and support n commands well enough that you can leave the speaker on for the entire connection process (and ideally have the option to leave it on, period). "Debugging by ear" can be a reality with modems, particularly during compatibility testing.

If possible, a hardware protocol analyser, or at least an RS-232 breakout box, should be obtained. These can be placed between the computers and modems, if needed, to troubleshoot the serial link and ensure that data is, in fact, being transferred between the modem and the computer -- a sanity check which comes in handy far more often than you might expect. Actual hardware protocol analysers are surprisingly expensive, however; old Wyse terminals are not, and are almost as useful for this purpose. If you find one, pick it up. Terminals that support automatic baud-rate detection are particularly useful.

If dialing with the modem also needs to be tested, a small analog PABX for home usage is needed. These PABX units are dirt cheap; an analog PABX for four internal lines and one external line should cost no more than US$50. If dialing is not needed, then the modems should be capable of directly driving a two-wire or four-wire line in leased-line mode; otherwise, the PABX is still needed.

Possible setups are for example:

a) Leased-Line Mode +-+ serial  +-+  2-wire  +--+  serial  +--+ | Development |--| Modem A |\/| Modem B  |--| BBS      | |  Computer   |--|         |/\| (answer) |--| Computer | +-+          +-+          +--+          +--+

or

b) With PABX +-+ serial  +-+  phone wire  +--+  phone wire  +--+  serial  +--+ | Development |--| Modem A |--| PABX |--| Modem B  |--| BBS      | |  Computer   |--|         |--|  X   |--| (answer) |--| Computer | +-+          +-+              +--+              +--+          +--+

or

c) Leased-Line Mode with Protocol Analyser

+-+ serial  +-+  serial  +-+  2-wire  +--+  serial  +--+ | Development |--| Y Cable |--| Modem A |\/| Modem B |--| BBS      | | Computer   |--| Breakout|--|         |/\| (answer) |--| Computer | +-+         +-+          +-+          +--+          +--+                               ||                               ||                               ||                          +--+                           | Protocol | | Analyser | +--+

Other combinations are of course also useful. And being able to easily reconnect the protocol analyser, e.g. between Modem B and the BBS Computer is helpful, too.

Operating System, Programming Language & Communication Basics
Before dealing with the details of handling a modem, a few basics should be in place. First of all, the communication with the serial interface should be in place. This includes that the APIs as provided by the particular operating system for serial communication - if any - should be understood. If the operating system doesn't provide such APIs, then it is recommended to first implement the UART access and wrap it into a library, if the serial UART in some hardware is supposed to be programmed directly. Alternatively, a programming language which provides convenient access to a serial interface can be used.

Whatever is used, it should be tested before starting to program for the modem. There is nothing more annoying than not knowing if a particular misbehaviour is caused by a failure in the serial communication with the modem, or is a problem with the modem (usually with the commands sent to it).

Unless in the most simple case, it is suggested to use hardware handshaking with the modem - particularly for speeds greater then 2400 bit/s or 9600 bit/s. Therefore, the used low-level serial communication software and hardware should support hardware handshake. If the UART supports some FIFO, like the 16550 UART, the FIFO should be enabled (both for sending and receiving data).

It is undecided if data reception via polling or via interrupts is better. If every incoming byte raises an interrupt there are many interrupts at high communication speeds, and, as surprising as it might sound, polling the UART might be more efficient in such cases.

Communication as supported by a modem is usually half-duplex. Either the DTE or the DCE talks, the other side is supposed to listen. The communication with the modem should best be done with

 * 8 Bit
 * No parity
 * 1 Stop bit

See the next section for speed information.

Line Speed is not DTE/DCE Speed
+-+ DTE/DCE speed +-+  line speed |   DTE /    || Modem / |-- | Computer   ||  DCE    |-- +-+               +-+

An issue which can be very confusing is the difference between the line speed (the data transfer speed on the telephone line) and the speed on the serial line between the DTE (computer) and the DCE (modem).

First, there is always some general confusion about the line speed, because some line speed is given with taking compression into account, while other data is given without taking compression into account. Also, there is a difference between bps and Baud due to the modulation schema used on the line. In addition, marketing blurbs obscure the picture. We will not make any attempt to clean up the long-standing Baud vs. bit/s confusion here (it is hopeless :-)). It is just recommended that whenever the modem returns information about line speed the above mentioned differences are taken into account to avoid any misinterpretation.

Second, the speed on the telephone line does not necessarily have to be the same as the speed on the serial line. In fact, it usually isn't on modern modems. It is recommended to set the DTE/DCE speed to a fixed speed instead of following the line speed. Logically, the fixed DTE/DCE speed should be large enough to cope with the highest expected line speed. V.90 modems should e.g. be accessed via 115200 bit/s or higher on the serial interface.

Setting the DTE/DCE speed on modern modems is quite simple. They all use autosensing on the serial interface. That is, they themselves detect the speed of data as received from the DTE and use the same speed to return data to the computer. They usually also autosense the parity, and 7 bit / 8 bit data length. Usually modems assume one stop bit when autosensing the serial interface. Therefore it is enough to just configure the serial interface on the DTE to the desired DTE/DCE communication parameters and let the modem figure it out on its own.

Autosensing can fail in rare cases and some modems might have broken autosensing. If a modem tends to fail autosensing it can help to start the initial communication after the DTE is configured with one or more nop AT commands AT repeated a limited number of times until the modem starts to return OK for the nop commands.

When a modem sets up a connection with a remote party it can report the used speed. In fact, it can report the line speed or just the DTE speed (some modems can report both). The end user is most probably interested in the line speed, and not the DTE/DCE speed. So from this point of view, it is best to set the modem to report the line speed, and e.g. write the received information to a log file. However, some old communication software or modem drivers interpret the response from the modem as a request to change the DTE/DCE speed. In such cases the modem must be set to always return the DTE/DCE speed. Since this DTE/DCE speed will be the same as detected via autosensing there will be no speed change.

In the rare case that the DTE/DCE speed should indeed follow the line speed, the responses from the modem should of course be set to return the line speed. Then the DTE software has to evaluate the response, and change the DTE/DCE speed accordingly. This is really not recommended these days.

See the command for details on how to set which response to get.

Character Set and Character Case
Commands sent to the modem, and textual responses are supposed to be in the ISO 646 character set. ISO 646 is just another name for the familiar 7-bit ASCII character set. Typically, modems chop off any 8th bit in commands they receive anyhow. They interpret the result as if the command has been sent using only 7-bit characters. However, it is not recommended to rely on this, but instead ensure that commands are only sent using 7-bit characters.

Commands are not case sensitive, assuming a modern modem. Some early modems insisted on uppercase-only commands. Still, a generic driver could do worse than ensuring that all commands are sent in uppercase, and all responses are interpreted case-independent. Typically, both letters of the  command prefix must be of the same case. So  and   are acceptable, while   and   are not.

Welcome to the World of State-Machines
Modem programming means to tap into the world of telecommunications. This is an unknown field for most amateur, as well as professional programmers. Telecommunication is heavily centered around state-machines. And in fact, it is rather difficult or impossible to program a modem without using a state-machine. The modem is at any time in a particular state, and any DTE software which tries to control and use the modem needs to track the state of the modem - in its own state machine. This is necessary, because a Hayes-compatible modem can only do certain things when it is in a certain state. E.g. it can only dial out if it is not already connected to some remote site.

Part of a modem's state can be tracked via particular RS-232 lines. E.g. DCD (data carrier detect) can be used to figure out if the modem has detected a remote modem's carrier signal. Other information is provided by the flow-control lines. However, some states, and associated data need to be tracked via interpreting the modem's result codes.

People unfamiliar with the theory and practice of state machines often try to circumvent the issue by "tough coding". Which means, they throw more and more code onto the problem (wrapped in a heap of if/the/else/otherwise/maybe/... statements), until things seem to work - sort of. If they are lucky they have implicitly managed to create a state machine which works. If they are unlucky, they end up with a partial state machine, which breaks down should something unusual happen in the communication. This usually comes with the problem that the software was not designed to recover if things break down. So such software tends to hang or crash.

It is much more efficient to first spend a few hours to to learn the basics of simple state machines, and then spending a few more hours to describe the communication with the modem as a state machine. The result of this planning serves as a nice template for implementing the DTE software.

Flow Control
A slow device needs a way to tell its peer that currently, it is busy, so further incoming data must be stopped until this slow device tells otherwise. This mechanism is provided by flow control. There are two ways of doing flow control: by hardware or software.

Hardware Flow Control
Hardware flow control is usually implemented using the CTS (Clear To Send) and RTS (Request To Send) lines, which needs separate hardware data lines between devices. This is allocated in the RS-232 cable specification.

Hardware flow control based on DSR (Data Set Ready) and DTR (Data Terminal Ready) is uncommon, particular for modems. It can usually be found at serial printers. Again, DSR/DTR hardware flow control requires additional hardware data lines between devices.

From a programming point of view there is usually not much difference in programming CTS/RTS or DSR/DTR hardware flow control. The hardware has to provide means to drive/read the corresponding signals in the serial interface. If the hardware supports both, CTS/RTS and DSR/DTR flow control, then it is recommended to support both and provide the user with a configuration option.

It should be noted that some hardware or operating system drivers do not provide means to drive/read the less common DSR/DTR combination. If the remote device insists on DTR/DSR flow control a common workaround is to use CTS/RTS in the software, but rewire the cabling so the CTS/RTS wires are in fact connected to DSR/DTR.

Software Flow Control
This kind of flow control doesn't need extra signal line(s) like hardware flow control, but instead uses special control characters within the data content. To stop further incoming data, the receiving device sends the XOFF character. To enable more data, an XON character will be sent.

However, since the data being sent cannot contain these characters (unless you know that the receiving device ignores such information), binary (non-ASCII) data cannot be transmitted this way. Software flow control is typically used for communications to terminals and other character-based devices. Binary data should not be sent this way as it could, randomly, contain these characters. Hardware flow control using RTS/CTS is usually used.

Helpful Hint: Realizing that the Control Key is a special "shift" key that chops off the 100 bit (octal), it is easy to remember that the ASCII character used for sending XOFF is a Control-S (23 Octal) while the character for XON is a Control-Q (21 Octal). [Think of "S" for Stop and "Q" for Qontinue... don't you spell it that way?]

General
Changing the state from command state to on-line state or vice versa is either straightforward or a great mystery. This module covers the more obscure ways.

On-line State to Command State
It is of course possible to switch from on-line state to command state by dropping the connection (going on-hook in modem terminology). It is also possible to temporarily switch into command state while keeping the connection.

Going on-hook programmatically (and not via dropping a modem control line) requires to first switch into command state while keeping the connection, too.

Switching into command state, while in fact in the middle of transferring data (nothing else is meant with on-line state) requires to send a certain escape sequence as part of the data. This escape sequence is detected by the modem and the modem changes state. Since this character sequence might also be part of the normal data, an additional mechanism is needed to separate the escape sequence from normal data. This is the curse of inband signalling.

The separation of the escape sequence is done by using a so called guard time, which was once patented by Hayes. As a result, some modem manufacturers eliminated the guard time using an alternate escape sequence called the Time Independent Escape Sequence. Anyway, the escape sequence is only recognized by the modem when there was no other data from the DTE (terminal) for at least the duration of the guard time, and when there was no other data from the terminal after the escape sequence for at least the duration of the guard time, too.

An escape sequence consists of three times the same particular character. The character, as well as the guard time is configurable. By default, the character is, and the guard time is one second. So, with the default configuration, a change to command state requires

<1 sec. nothing>+++<1 sec. nothing>

If the connection should be dropped, this escape sequence should be followed by the  command to go on-hook, which is  :

<1 sec. nothing>+++<1 sec. nothing>ATH0

Command State to On-line State
The usual way to go from command state to on-line state is via dialing the remote site (see  command). But if the connection already exists, and the modem has been switched to command mode via the escape sequence, the way is different.

If the connection should not be dropped, but instead data transmission should be continued, the  (letter o, digit zero) command is needed:

<1 sec. nothing>+++<1 sec. nothing> send a few more modem commands, then go back on-line ATO0

AT Commands
The following list is the list of the original Hayes commands. Different modems use slightly different commands. However, this list is supposed to be as "generic" as possible, and should not be extended with modem specific commands. Instead it is recommended to provide such command lists in an Appendix.

AT Command Format
Here is a summary of the format and syntax of AT commands. Please note that most of the control characters are configurable, and the summary only uses the default control characters.

 * AT commands are accepted by the modem only when in command mode. The modem can be forced into command mode with the.

 * Commands are grouped in command lines.

 * Each command line must start with the and terminated with . The only exception is the  command.

 * The body of a command line consists of visible ASCII characters (ASCII code 32 to 126). Space (ASCII code 32) and ASCII control characters (ASCII code 0 to 31) are ignored, with the exception of, , and.

 * All characters preceding the are ignored.

 * Interpretation / execution of the command line starts with the reception of the first (and also command-line terminating).

 * Characters after the initial and before the  are interpreted as commands. With some exceptions, there can be many commands in one command line.

 * Each of the basic commands consists of a single ASCII letter, or a single ASCII letter with a prefix, followed by a numeric value.  Missing numeric values are interpreted as   (zero).

 * The following commands can't be followed by more commands on the command line. They must always be the last commands in a command line. If they are followed by other commands, these other commands are ignored. However, some of these commands take command modifiers and it is possible that a following command is accidentally interpreted as a command modifier. Therefore, care should be taken to not follow these commands with any more commands on the same command line. Instead, they should be placed in an own command line.
 *
 *
 *

 * A command line can be edited if the terminating has not ben entered, using the  to delete one command line character at a time. The initial  can't be edited/deleted (it has already been processed, because upon reception of the  the modem immediately starts command line parsing and editing, but not execution).

 * The modem echoes command lines and edits when is on (surprise, surprise :-)).

 * When echo is on, s are echoed with a sequence of  (backspace, space, backspace) to erase the last character in e.g. a terminal program on the DTE.

 * A command line can be cancelled at any time before the terminating by sending the . No command in the command line is executed in this case.

 * The and  can also be cancelled as long as the handshake with the remote site has not been completed. Cancellation is done by sending an additional character. In theory, it doesn't matter which character. But care has to be taken that cancellation is not attempted when the handshake has already completed. In this case the modem has switched to on-line state  and the character will be send to the remote side. A save way to avoid this problem is to always use the  followed by going on-hock with the . If the modem is already in the on-line state, this will drop the connection. If the modem is still in the handshake phase the first character of the  will cancel the command (and the rest will be interpreted as a normal command line, doing no harm).

 * Command line execution stops when the first command in the command line fails, or the whole command line has been executed. Every command before the failed command has been executed. Every command after the failed command and the failed command in the command line has not been executed.

 * There is no particular indication which command in a command line failed, only that one failed. It is best to repeat the complete command line, or to first reset the modem to a defined state before recovering from a failure.

 * A modem only accepts a new command line when the previous command line has been executed (half-duplex communication). Therefore, care should be taken to only send the next command line after the result code from the previous command line has been received.

Command Description Template
To be removed when all commands are documented.

Syntax:

Description:

Result Codes:

Related Commands and Registers:
 *

Special Commands and Character Sequences
See Special Commands and Character Sequences Reference

AT Commands A - M
See AT Commands A - M

AT Commands N - Z
See AT Commands N - Z

AT& Commands
See AT& Commands

Result Codes
See Result Codes

S-Registers
See S-Registers

Introduction
Modern consumer modems provide a number of additional features which were originally uncommon for a modem, but became standard features over time. This section provides an overview about how to program these features.


text:
User talk:MichaelBurns

Hi my name is Michael Burns. I am an American citizen. I currently own my own business called Visions, it is located in Nashville, Tn. I hope to make some good contributions to this site as much as possible.

I noticed that you had created a page that you were planning to expand into an autobiography. This should go on your user page since it's not related to textbook materials. Thanks, welcome to Wikibooks, and I hope that you decide to stay and contribute. Guanaco 23:48, 14 Sep 2004 (UTC)

title: User talk:MichaelBurns


text:
TeX/baselineskip

< TeX

Synopsis
\baselineskip=[length]

Description
A parameter that tells TeX the distance between baselines.

Examples
If 10pt fonts are being used, then \baselineskip=20pt will cause the lines to be "double spaced."

title: TeX/baselineskip


text:
User talk:AhmadH

You may wish to browse the changes to http://en.wikibooks.org/w/wiki.phtml?title=Human_Physiology_-_The_renal_system&action=history.

You'll see what I mean.

title: User talk:AhmadH