3 Years ago28 Dec 2017 3:13 am by Dog Cow
Penjadwalan merupakan kumpulan kebijaksanaan dan mekanisme di sistem operasi yang berkaitan dengan urutan kerja yang dilakukan sistem komputer. Sasaran atau tujuan utama penjadwalan proses optimasi kinerja menurut kriteria tertentu. Dimana kriteria untuk mengukur dan optimasi kerja penjadwalan antara lain. Get more done with the new Google Chrome. A more simple, secure, and faster web browser than ever, with Google’s smarts built-in. See the best Cute Puppy Backgrounds Download Free collection. If you see some Cute Puppy Backgrounds Download Free you’d like to use, just click on the.
For the serious programmer and computer enthusiast, the Macintosh™ 68000 Development System is a powerful environment for creating Macintosh programs in assembly language. The development system gives you these advantages:
So reads the copy on the back of the box for the Macintosh 68000 Development System, known as MDS for short. This is the second part in our series on Macintosh programming here at the Mac 512K Blog. The first was Macintosh Software Development: Historical Overview. We also talked about the first assembler for Macintosh, MacASM by Mainstay. Brief History of the Macintosh 68000 Development System The MDS is an integrated editor, assembler, linker, and a few other applications which facilitate native application development on a Macintosh 128K or 512K, though a 512K is strongly recommended. As with any development system or language for Macintosh, it is vital to have Inside Macintosh, which explains how all the Toolbox and Macintosh Operating System routines work, and how to call them in your applications. MDS can also be used to create desk accessories and device drivers, not just applications. MDS is not the first native Macintosh development system, nor is it the first native Macintosh assembler. The MDS was a product of Consulair Corporation, written by Bill Duvall. It was referred to as the 'MacAssembler' in early 1984 literature, and sometimes as the 'Macintosh Editor/Assembler.' Pre-release copies of MDS were distributed as early as summer 1984, and were described as 'somewhat buggy.' The assembler was originally slated to be released in summer 1984. David Smith wrote an introductory article based on the August 1984 pre-release version for MacTech magazine. Bill Duvall formerly worked at Xerox PARC with Larry Tesler, where he was working on a distributed operating system on his own. Duvall was also part of the NLS project, oN-Line System. In fall 1984, Duvall was porting not only his assembler to Macintosh, but also a C compiler that he had written too. By some accounts, Consulair's Mac C system was available before the assembly language development system. In early 1985, Duvall was still busy putting the finishing touches on MDS. Andy Hertzfeld talks about Bill Duvall and the Macintosh 68000 Development System in his Folklore blog, writing:
(See also Dr Dobbs Journal interview with Bill Duvall, 1991.) According to a February 19, 1985 report by John Mark Agosta on the Info-Mac mailing list,
The Macintosh 68000 Development System by Consulair was finally available for sale in spring 1985. Version 2.0 of MDS was available in fall 1986. It required a Mac 512K or Macintosh Plus. It included several new features and improvements, such as:
However, by this time, Macintosh development gurus were pushing people toward the beta versions of MPW, the Macintosh Programmer's Workshop. MDS had its day; in 1986, MPW was the future of Macintosh development. In mid-March 1987, Apple Computer discontinued support for MDS, and allowed the rights of the software to revert back to Consulair Corporation. Consulair then sold this development system under the name Consulair 68000 Development System, after the rights reverted from Apple back to Consulair. The CDS v2.1 was available in fall 1987 from APDA, MacWarehouse, and other software distributors. Apple 32 SuperMicros Developer's Handbook Included among the documentation in the 68000 Development System is a really fascinating manual known as the Apple 32 SuperMicros Developer's Handbook. This saddle-stitched manual (shown in the photo above, at right) is dated fall 1984 and provides an overview of the Apple Lisa 2 (or, Macintosh XL), Macintosh 128K, and Macintosh 512K. These three computers made up Apple's '32 SuperMicro' family of computers which shared a Motorola 68000 CPU, Lisa Technology, and the Macintosh operating system. While today we may think of the Lisa as the lesser of the two (Macintosh and Lisa), in fact the Lisa was king of the hill, featuring 1 MB of RAM and a 5 or 10 MB hard disk. Until the Macintosh Plus arrived on the scene in 1986, a Lisa 2/Macintosh XL running MacWorks was the biggest and most powerful Macintosh system available. The Handbook is divided into 8 sections:
This manual is designed to be the developer's roadmap to the entire Macintosh family: an overview of the Macintosh and its design, development systems and languages available for it, software and accessories available (such as the Imagewriter printer), and how to market your new product for Macintosh. Here is an excerpt from the section entitled, 'Developing for Macintosh':
Overview of the 68000 MDS I have MDS Revision A, Released February 18, 1985, and this is the version that we will be using. The MDS will run on a Macintosh 128K with a single disk drive, but this setup will not provide a pleasant programming experience for you. The recommended configuration is a Mac 512K with external disk drive (as it turns out, an external disk drive is recommended in every situation ). Having a printer will also prove useful as your applications become larger. You will be able to print the source code and mark it up in pen or pencil. You will be able to see a lot more of the code at once on paper, than you can on the small Macintosh screen. Each application in the Macintosh 68000 Development System has a Transfer menu that allows you to launch another application in the system. It is possible to edit, assemble, link, and finally run an application all without returning to the Finder. Editor The text editor, named Edit, is the central hub of the entire MDS. You use it to edit every type of source file, not just program source, but also resource definition files, instructions for the executive, and linker files. You can have up to 4 windows open at once in the Editor to edit multiple files. In addition, the assembler will write errors to a file, and you can open this file with Edit to see which errors need to be corrected. Assembler Asm is the name of the 68000 assembler. It takes assembly source files and produces .Rel files which contain relocatable code. This code is not quite ready to run on the Macintosh. It needs to be processed by the Linker. Assembly source files should end with .asm in their name. Linker The Linker, named Link, merges one or more .Rel files and macros to produce an executable Macintosh application, desk accessory, or driver. In order to work, the Linker needs a list of files to combine. This list is stored in a file, created with the editor, whose name should end with .link. Resource Compiler Resources are a fundamental building block of every Macintosh application. Andy Hertzfeld wrote the Resource Compiler, called RMaker, in June 1984. It turns a resource definition file written in human-readable text (with the editor) into a resource file suitable for the Macintosh. Resource definition filenames should end with .R. Executive Creating a Macintosh application requires at minimum 3 applications which must be called in sequence: the assembler, the linker, and the resource compiler. What if we could automate this process, and write a set of instructions which tell the Macintosh which files need to be assembled, linked, and resource compiled? We can, and that application is called Exec. Instruction scripts (also called job files) for Exec should end with .job. Getting Started with MDS Boot the MDS1 disk, then double click the OPEN ME FIRST!! icon on the desktop. The Edit application will load from disk, and after a few seconds, you will see the release notes for MDS. The notes urge you to create two working disks for MDS that contain only the necessary files for development. One disk should contain the main applications: Edit, Asm, Link, Exec, RMaker, and a System folder. The second disk should contain the sample programs, .D files, and packed macros. The release notes go on to recommend that you always specify a volume name when referring to a file in your source code. For the Edit application, it is suggested that you stick with 9 point Monaco to conserve memory. The editor can have several windows open at once, but if you are working on a Mac 128K, it is urged that you limit your work to two windows open at once. The second half of the release notes cover changes to the 68000 Development System manual since it went to press. Finally, the notes point to Delphi and Compuserve discussion boards for the latest software updates and conversations with other Macintosh developers:
And that's it! This 68000 Development System and its included documentation and example source code, Inside Macintosh, Technical Notes, and the Macintosh Software Supplement, were all that Apple provided to developers. Some books on Microsoft BASIC and Macintosh Pascal were available in 1985. But it wasn't until 1986 (I'm not aware of any published earlier) that authors started publishing books on Macintosh assembly language. Let's create the two working disks that we need to use MDS. From the Edit application, choose Quit from the File menu to return to the Finder desktop. If necessary, initialize two blank Macintosh disks. Use the Finder to copy MDS1 to one of your new, blank disks. Simply drag the icon of the original, source disk MDS1, to the icon of your new, working disk 1. As recommended by the release notes, delete the following files from your new disk 1:
Now for your second working MDS disk, only copy the following files from MDS2:
This last file, PackMacs.Txt, is located within the Equ Files folder on MDS2. Open that folder, and copy only it to your second working disk. Your two working disks should look like this screenshot, and should be named MDS1 and MDS2: I named my disks Scarab and Sarah. Are you curious why? Scarab was the name of the disk because I intended to put the game Scarab of Ra on it, but then discovered that this game would not run on a 512K Mac. So I used the disk for MDS instead, without changing the name. Sarah is a friend of mine; after Scarab, I figured I'd pick a second name beginning with S. But I will refer to these disks as MDS1 and MDS2. The last thing I did was to upgrade the System and Finder on my working MDS disk 1 to System 2.0 and Finder 4.1. The original MDS master disk ships with Finder 1.1g, which is not a very good version. Finder 4.1 is so much better. Lock the two original MDS disks, but keep both your working MDS disks unlocked. Now let's try working in Edit. Reboot your Mac from your new MDS disk 1. When the Finder desktop appears, open the disk icon and launch Edit. Choose New from the File menu, or press Command-N to get a new document window. You can press Command-N a few more times to get more empty document windows. Edit will allow you four windows at once on the Mac 512K. Press Tab, then type something, such as your name. Press Return. Notice that the next line automatically indents. This feature is called Auto Indent. You can turn it on or off from the Format menu. By default, a tab is worth 8 spaces. If you'd prefer to save some horizontal room on the screen, you can reduce this number to 4 or whatever you prefer, again from the Format menu, the Set Tabs command. Find and Replace commands are in the Search menu. You can match whole or partial words. If you want, you can set the font and size for text, but as mentioned earlier, having this capability probably isn't very helpful for programming. It's best to stick with 9 point Monaco. However, the Edit application can be used for general-purpose word processing, not just writing source code. ![]() When you have a new document that has never been saved before, you need to choose Save as... from the File menu to give it a name and save it to disk. Do that now if you want. Save your new file to your second MDS disk with some appropriate name. The final important feature to know about in Edit is that if there is the name of another file in an open document, let's say for example it's PackMacs.Txt, you can highlight that name. Once highlighted, open the File menu, and you'll see a second Open command that's especially for that highlighted file. The shortcut is Command-D. This can be a useful time-saver if you need to open and edit another file referenced in your source code. For now, all of our example assembly applications will use only one source code file. But you could have a much larger application whose source code is contained in multiple files. Assembling a Demo Application Now let's assemble and link a very small demo application. We are going to follow the example of the First Program from Dan Weston's book, The Complete Book of Macintosh Assembly Language Programming, pages 6-8. If you have this book now, you can follow along in the book. All I'm doing here is paraphrasing the text from the book. Launch the Edit application on MDS1 by double-clicking its icon. Choose New from the File menu or press Command-N to get a new document for editing. Type the following lines of code:
The first line beginning with a semicolon ( ; ) is a comment for human-use only. The assembler ignores all comments. The next line is an include statement that loads macro names for Macintosh toolbox traps from the file MacTraps.D. One of the macro names is _ExitToShell. After another comment about the shortest assembly program, comes our one and only instruction in this application: a call to _ExitToShell. Technically, this isn't even a 68000 instruction; it's a macro call to a toolbox trap. This toolbox trap causes the current application to end, and loads the operating system shell, which is typically the Finder. Thus, all this application does is quit itself. This may at first seem like a useless application, but actually it has one small use. It can be used to change the startup disk for the Finder. The startup disk is the one that the Macintosh uses to locate the System resource file, which contains desk accessories and fonts. It may be that you want to access desk accessories or fonts on another disk, so if you put this application on that other disk and launch it, that disk will now be the active startup disk. Save this code by choosing Save as... from the file menu. In the filename text box, type MDS2:FirstProgram.ASM and click Save. Now it is time to assemble this source code. From the Transfer menu, choose ASM MDS2:FirstProgram.ASM. The editor will close and the assembler will load in its place. It will automatically open the FirstProgram.ASM file and begin assembling it to machine language. It will take a few seconds to complete assembly. If you typed the code exactly as shown, there should be no errors. Choose Edit from the Transfer menu to go back to the editor. We next need to type the linker file. In the editor, open a new window and type the following lines:
Save this text file on MDS2 with the name FirstProgram.LINK. From the Transfer menu, choose LINK MDS2:FirstProgram.LINK. The linker will load, opening the FirstProgram.Rel file, and creating an application named FirstProgram. Link will then exit and the Exec application loads. From the File menu, choose Open Application. In the open file dialog, change drives if necessary, then double-click FirstProgram in the list. After a few more seconds of disk activity, the Finder desktop will reappear. As long as you didn't see a system bomb, everything probably worked OK. Puppy Park (dan) Mac Os XLet's modify the application by adding _SysBeep before _ExitToShell. This will make it beep before it returns to the Finder. Open the FirstProgram.ASM file in Edit and add this new line. Assemble and link again. Note that if the application source has previously been linked, you will see an option in the linker's Transfer menu to transfer to your application, as shown in this screenshot: Now you should hear the Macintosh speaker beep when you launch FirstProgram. If the beep happens to be longer than usual, don't worry, that's not a problem. _SysBeep takes a parameter on the stack to define how long the beep should last, but we're not specifying that parameter in our application. Your next assignment: read Inside Macintosh to learn how to specify the duration parameter to _SysBeep! It's only a single line that you need to add before _SysBeep. Next Steps If you successfully assembled and linked the First Program, then you're already ahead of many others in the quest to program the Macintosh in assembly language using the Macintosh 68000 Development System! Read Dan Weston's book and follow along in Chapter 2 to create the Doodle application. We can also show how to use the two-machine debugger in a future blog article. The next Mac 512K Blog article will reveal a secret hidden in the modem icon on the back of the Macintosh! Puppy Park (dan) Mac Os Catalina
Puppy Park (dan) Mac Os 11Puppy Park (dan) Mac Os Download« Macintosh System/Finder Versions • Modem Port Icon: Hidden Tribute to Steve Jobs? »Comments are closed.
|