?
Solved

Port Addressing

Posted on 1998-11-14
3
Medium Priority
?
195 Views
Last Modified: 2013-12-26
I need to know the hex number for addressing the communications ports and how to address the SCSI port
0
Comment
Question by:jmcalle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Accepted Solution

by:
hansriet earned 200 total points
ID: 1291581
The SCSI port(s) should be addressed via the SCSI Manager in the Apple Toolbox. This is the safest way to program.
Find the details in the OS_Utils.sit.hqx file on http://www.apple.com/developer/

The same is true for palying around with the serial ports (ADB/printer/modem/USB). Access them via toolbox routines and your code will be safe in the future.
See the ADB manager, PPC manager, AppleTalk manager, Communication Toolbox etc.

Get Inside Macintosh either online, on CD ROM or the old fashioned paperbacks, though they may be a bit outdated.
0
 

Author Comment

by:jmcalle
ID: 1291582
Thank you Hansriet for your answer.  but what programming applications did you used?

0
 

Expert Comment

by:hansriet
ID: 1291583
I use Metrowerks CodeWarrior Pro3, the languages I use are C and C++.

Here's some code to find serial ports:

#include <CommResources.h>
#include <CRMSerialDevices.h>

#include <stdio.h>

main()
{
    CRMRec      c;
    CRMRecPtr   cPtr = &c;
    CRMSerialPtr    serialPtr;

    printf("Listing of available serial ports\n");
    InitCRM();

    c.crmDeviceType = crmSerialDevice;
    c.crmDeviceID   = 0;
    while (cPtr != nil) {
        cPtr = (CRMRecPtr)CRMSearch((QElemPtr)cPtr);
        if (cPtr) {
            serialPtr = (CRMSerialPtr)cPtr->crmAttributes;
            printf("We have a port called: %#s\n", *(serialPtr->name));
            printf("   input driver named: %#s\n", *(serialPtr->inputDriverName));
            printf("  output driver named: %#s\n\n", *(serialPtr->outputDriverName));
            c.crmDeviceID = cPtr->crmDeviceID;
        }
    }
}

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question