From ae643f5728b0d7bbc0eaa063dfc97317184db371 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 24 Feb 2004 22:30:14 +0000 Subject: [PATCH] Add ReadLocation(MachineLocation) --- second/glue.S | 11 +++++++++++ second/glue.h | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/second/glue.S b/second/glue.S index c10e129..2920433 100644 --- a/second/glue.S +++ b/second/glue.S @@ -144,3 +144,14 @@ Gestalt: move.l %a0, %a1@ unlk %fp rts + + /* void ReadLocation(MachineLocation * loc) */ + + .global ReadLocation +ReadLocation: + link %fp, #0 + move.l 8(%fp), %a0 + move.l #0x000C00E4, %d0 /* ReadLocation */ + dc.w 0xA051 /* ReadXPRam */ + unlk %fp + rts diff --git a/second/glue.h b/second/glue.h index 42895d5..e543c8c 100644 --- a/second/glue.h +++ b/second/glue.h @@ -4,8 +4,22 @@ * */ +struct MachineLocation +{ + long latitude; + long longitude; + union + { + char dlsDelta; + long gmtDelta; + } u; +}; +typedef struct MachineLocation MachineLocation; + + extern void glue_display_properties(unsigned long *base, unsigned long *row_bytes, unsigned long *width, unsigned long *height, unsigned long *depth, unsigned long *video); extern int Gestalt(unsigned long selector, long * response); +extern void ReadLocation(MachineLocation * loc);