Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Милич.doc
Скачиваний:
6
Добавлен:
22.11.2019
Размер:
1.3 Mб
Скачать

Structured Programming

One of the best features of the Macro Assembler is that it lets you write structured assembly language programs. By "structured", we mean programs that contain high-level statements that perform loops, conditional jumps, and other control tasks that would otherwise take several assembly language instructions. In effect, the structure statements provide the same kinds of complex operations as BASIC. For example, one family of structure statements or logic structure does the same thing as an IF-THEN-ELSE statement in BASIC while another provides a function similar to FOR-NEXT.

But structured programming involves more than dimply using structure statements instead of instructions. Rather, it is a philosophy of software design that involves:

  • Top-down design. (Remember, this is an approach in which you build programs by starting with comments and add more and more detail in gradual steps.)

  • Label-free programs.

  • "GOTO"-free programs (no conditional or unconditional jump instructions).

  • Indentation to show levels of nesting in logic strictures.

  • Listings that are more self-documenting.

  • The purpose for doing all this is to increase the quality of assembly language programs. Quality improvement should be apparent in several areas:

  • The developer will understand the logic of the program better.

  • The listing will be more readable to someone trying to make changes when he or she is not the author.

  • Because the program is more readily understandable, there should be fewer "bugs" in it.

  • Reliability and serviceability are improved. This means the program is more apt to work correctly as designed and future modifications can be made with more assurances that the changes will fit within the present design without introducing new bugs.

  • Improved readability will help make the listing its own best documentation.

The feature that allows you to use structure statements is a program called SALUT (for Structured Assembly Language Utility) on the Macro

Assembler disc. What you do is enter your program, then run SALUT to convert the structure statements into standard assembly language instructions. From there, you assemble and link the program as usual.

Notes:

loop цикл; петля

conditional jump условный переход

philosophy принцип; подход

top-down design нисходящее проектирование

indentation структурированное расположение

текста

nesting вложение

bug ошибка; дефект; помеха

reliability надежность

serviceability удобство эксплуатации

apt возможный; вероятный; склонный

assurance гарантия

fit соответствовать; подгонять

readability удобочитаемость

Ответьте на вопросы:

  1. What programming languages are you taught?

  2. What languages would you like to learn? Why?

  3. What programming languages are the most popular?

  4. Are you good at programming?

5. Перегруппируйте абзацы текста, так чтобы они соответствовали тексту на русском языке. Какую информацию о Clipper Вы, можете добавить к прочитанному?

  1. Write your own user-defined functions in Clipper, Microsoft C, Assembler or other languages, for use anywhere in your programs. And now, in Clipper 5.0, even commands are user-definable. You never have to sacrifice features and functionality in your applications due to an insufficient command and function set; you're only limited by your imagination.

  1. Building on Clipper's traditional advantages. Clipper 5.0 shatters the 640K memory barrier in DOS so you can run large applications without defining overlays.

  2. New to Clipper 5.0 is its preprocessor, giving you optimized code, more control over your program architecture and additional facilities for customizing the language. We've even improved your ability to accurately model applications by implementing multidimensional arrays that can contain arrays. Array flexibility is unrivaled.

  3. Clipper's speedy compiler generates .EXE files that give you fast execution speed, source code security and cost-free distribution of applications for both single-user and networking environments.

  4. Clipper 5.0 is the newest version of Nantucket's premier application development system. Consisting of a comprehensive command and function set, an efficient linker, flexible preprocessor and high-performance compiler, Clipper 5.0 offers greater development freedom than any competing system.

  5. The Clipper language lets you build sophisticated applications. Superior user interfaces are particularly easy to construct. For example, Clipper's ACHOICE() function lets you easily build pop-up and pull down menus without spending hours writing lengthy code. Clipper's unique DBEDIT() makes programmable BROWSES a snap to build And with Clipper's implementation of memo fields, limitations found in other languages are eliminated, Using MEMOEDIT(), you'll be able to write programmable text editors to suit, any need. Clipper gives your applications the professional performance, appearance and ease-of-use required to succeed in today’s competitive marketplace.

    1. Доступная мощь. Clipper 5.0 является новейшей версией системы разработки приложений для UK Nantucket Corporation. Включая исчерпывающее множество команд и функций, эффективный редактор связей, гибкий препроцессор, высокопроизводительный компилятор и мощные утилиты, Clipper 5.0 предлагает наибольшую свободу разработки по сравнению с конкурирующими системами программирования для ПК.

    2. Компилятор Clipper 5.0 создает .ЕХЕ – файлы для быстрого выполнения программ, сохранности исходного кода и свободного от дополнительных платежей распространения программ как дли работы в сети, так и для одиночных пользователей. В целом, используя Clipper, Вы сможете разрабатывать более сложные про-

граммы за более короткое время.

    1. Вы можете писать свои функции на Clipper, Microsoft Си, Ассемблере или других языках. Используя Clipper 5.0, Вы можете определить даже свои команды. Вам не придется жертвовать какими либо характеристиками или функциональностью в Ваших программах из-за недостаточно полного множества команд и функций. Единственным ограничением являются пределы Вашего воображения.

    2. Мощь языка Clipper позволяет Вам разрабатывать современные программы. Используя Clipper, очень легко создавать высококачественные интерфейсы Пользователя. Например, функция Clipper ACHOICE0 позволяет Вам легко создавать появляющиеся и спускающиеся меню, не тратя многих часов на написание длинного кода. Уникальная функция Clipper DBEDITQ позволяет очень быстро создавать полноэкранные встроенные редакторы. Реализация мемо-полей в Clipper свободна от ограничений, свойственных другим языкам. Используя функцию MEMOEDIT() , Вы сможете написать программируемые текстовые редакторы, удовлетворяющие любым запросам. Clipper сделает Ваши программы высокопрофессиональными и простыми в использовании, что является залогом успеха на современном рынке программных средств.

    3. Построенный на традиционных преимуществах, Clipper 5.0 преодолевает барьер 640К памяти DOS и дает Вам возможность запускать большие программы без создания оверлеев.

  1. Новым в Clipper 5.0 является препроцессор, позволяющий сделать более простым и понятным исходный текст Ваших программ, улучшить их архитектуру, и предоставляющий дополнительные возможности в развитии языка. Мы значительно развили Ваши возможности программирования, предоставив в Ваше распоряжение многомерные динамические массивы, элементы которых могут содержать ссылки на другие массивы. Массивы по своей гибкости не имеют себе равных в других языках.

Unit 4

I. Запомните слова

gap-filler memory промежуточная память

magnetic bubble device устройство на цилиндрических

магнитных доменах (ЦМД)

charge-coupled devices приборы с зарядовой связью (ПЗС)

random-access memory (RAM) оперативная память

metal-oxide-semiconductor МОП-схема

(MOS)

performance раб. характеристика;

производительность

density плотность

trade-off компромисс

shift сдвиг

path канал

film пленка

trend тенденция; направление

supplementary дополнительный

serial последовательный

adjacent смежный; соседний

to stack накапливать

to transfer передавать; переносить

to compete конкурировать

to precede предшествовать

to borrow занимать; заимствовать

to catch up догонять

to annihilate отменять

to update обновлять; корректировать

to refresh обновлять; восстанавливать

pack пакет

actuator coil обмотка привода

drive накопитель

playback считывание