Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/100348.100430acmconferencesArticle/Chapter ViewAbstractPublication PagescscConference Proceedingsconference-collections
Article

Structured programming in Macintosh assembly language (abstract)

Published: 01 January 1990 Publication History

Abstract

Ever since Dijkstra first pointed out the harmfulness of the Goto twenty years ago, programmers in high-level language have become more and more accustomed to writing structured programs. No such development has taken place in assembly language due to the lack of such constructs as the If-Then, If-Then-Else, While-Do, and Repeat-Until statements of Pascal.
It is possible, however, to achieve the same effect by the exercise of programming discipline if all branching in the program is made to follow the rules of structured programming. For example, an If-Then statement such as If X = 0 Then Y := 1 Else Y := 2 EndIf may be implemented in Macintosh assembly language as If1 Tst.W X(A5) ;if X < > 0; Then Goto; Else1 Bne Else1 Move.W #1,Y(A5) ;Y := 1 Bra EndIf1 ;Goto Endif1 Else1 Move.W #2,Y(A5) ;Y :=2 EndIf1
While such programs may appear somewhat strange at first, consistent application of the discipline makes it very easy to convert any algorithm expressed as a structured high-level language program to Macintosh assembly language completely mechanically and, therefore, correctly.
A textbook on Macintosh assembly language incorporating these principles is under development by the author.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
CSC '90: Proceedings of the 1990 ACM annual conference on Cooperation
January 1990
475 pages
ISBN:0897913485
DOI:10.1145/100348
  • Chairman:
  • Arun Sood
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 January 1990

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

CSC90
Sponsor:
CSC90: 18th Annual ACM Computer Science Conference
February 20 - 22, 1990
D.C., Washington, USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 29 Nov 2024

Other Metrics

Citations

View Options

View options

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media