module    EQU       "GVWR"
intrface  EQU       0x0100
gvw_ext   EQU       "    "
MACRO gvw_name
                   ;"----------------"
          DC.B      "Bitmap half     "
          ALIGN     16
                   ;"----------------"
ENDM
MACRO gvw_copyright
                   ;"------------------------"
          DC.B      "V 1.00 Oct 22.`93 (c) by"
          ALIGN     24
          DC.B      "Dieter Fiebelkorn"
          ALIGN     24
          DC.B      "Gr］er Weg 29a"
          ALIGN     24
          DC.B      "D-45768 Marl (Germany)"
          ALIGN     24
                   ;"------------------------"
ENDM

spprt_mon EQU       0x0001
spprt_col EQU       0x0002
spprt_tc  EQU       0x0004

flag_null EQU       0x0000
flag_res  EQU       0x0001

rsvd_null EQU       0x0000


          GLOBL     gvw_main
          GLOBL     form_alert

          JMP       gvw_failed                                  ; $00
          JMP       gvw_main                                    ; $06
          DC.L      module                                      ; $0C
          ALIGN     4
          DC.W      intrface                                    ; $10
          DC.W      spprt_mon|spprt_col                         ; $12
          DC.W      flag_null                                   ; $14
          DC.W      rsvd_null                                   ; $16
          DC.W      rsvd_null                                   ; $18
          DC.W      rsvd_null                                   ; $1A
          DC.L      gvw_ext                                     ; $1C
          ALIGN     4
          gvw_name                                              ; $20
          gvw_copyright                                         ; $30
gvw_failed:                                                     ; $90
          MOVE.W    #1, D0
          LEA.L     str_failed, A0
          JSR       form_alert
          CLR.W     -(A7)
          TRAP      #1
str_failed:
          DC.B      "[3][ | This is a GEM-View Module! | ][ Abort ]"
          EVEN



          GLOBL     hhalf2

hhalf2: ; IN: D0 (UWORD -> UCHAR)
          LEA       half2tab,A0
          MOVEQ     #0,D2
          MOVE.B    D0,D2
          MOVE.B    $0(A0,D2.W),D1
          LSR.L     #8,D0
          MOVE.B    D0,D2
          MOVE.B    $0(A0,D2.W),D0
          ASL.B     #4,D0
          OR.B      D1,D0
          RTS

half2tab:
          DC.B      $00, $00, $01, $01, $00, $00, $01, $01, $02, $02, $03, $03, $02, $02, $03, $03
          DC.B      $00, $00, $01, $01, $00, $00, $01, $01, $02, $02, $03, $03, $02, $02, $03, $03
          DC.B      $04, $04, $05, $05, $04, $04, $05, $05, $06, $06, $07, $07, $06, $06, $07, $07
          DC.B      $04, $04, $05, $05, $04, $04, $05, $05, $06, $06, $07, $07, $06, $06, $07, $07
          DC.B      $00, $00, $01, $01, $00, $00, $01, $01, $02, $02, $03, $03, $02, $02, $03, $03
          DC.B      $00, $00, $01, $01, $00, $00, $01, $01, $02, $02, $03, $03, $02, $02, $03, $03
          DC.B      $04, $04, $05, $05, $04, $04, $05, $05, $06, $06, $07, $07, $06, $06, $07, $07
          DC.B      $04, $04, $05, $05, $04, $04, $05, $05, $06, $06, $07, $07, $06, $06, $07, $07
          DC.B      $08, $08, $09, $09, $08, $08, $09, $09, $0A, $0A, $0B, $0B, $0A, $0A, $0B, $0B
          DC.B      $08, $08, $09, $09, $08, $08, $09, $09, $0A, $0A, $0B, $0B, $0A, $0A, $0B, $0B
          DC.B      $0C, $0C, $0D, $0D, $0C, $0C, $0D, $0D, $0E, $0E, $0F, $0F, $0E, $0E, $0F, $0F
          DC.B      $0C, $0C, $0D, $0D, $0C, $0C, $0D, $0D, $0E, $0E, $0F, $0F, $0E, $0E, $0F, $0F
          DC.B      $08, $08, $09, $09, $08, $08, $09, $09, $0A, $0A, $0B, $0B, $0A, $0A, $0B, $0B
          DC.B      $08, $08, $09, $09, $08, $08, $09, $09, $0A, $0A, $0B, $0B, $0A, $0A, $0B, $0B
          DC.B      $0C, $0C, $0D, $0D, $0C, $0C, $0D, $0D, $0E, $0E, $0F, $0F, $0E, $0E, $0F, $0F
          DC.B      $0C, $0C, $0D, $0D, $0C, $0C, $0D, $0D, $0E, $0E, $0F, $0F, $0E, $0E, $0F, $0F
