; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; Environment for calling source.jdhuff from ObjAsm.

r0 RN 0
r1 RN 1
r2 RN 2
r3 RN 3
r4 RN 4
r5 RN 5
r6 RN 6
r7 RN 7
r8 RN 8
r9 RN 9
r10 RN 10
r11 RN 11
r12 RN 12
r13 RN 13

sl RN 10
fp RN 11
ip RN 12
sp RN 13
lr RN 14
pc RN 15

        AREA |C$$code|, CODE, READONLY
        EXPORT asm_huff_decode_blocks
        EXPORT asm_huff_skip_blocks
        IMPORT exit
        IMPORT  panic_exit

;; for debugging only
;        EXPORT huff_fill_her_up
;        EXPORT huff_check_stuff_byte

;        EXPORT huff_decodeexit0
;        EXPORT huff_decodeexit1
;        EXPORT huff_decodeexit2
;        EXPORT huff_decodeexit3

;        EXPORT huff_noshortcut0
;        EXPORT huff_noshortcut1
;        EXPORT huff_noshortcut2
;        EXPORT huff_noshortcut3

;        EXPORT huff_decode_loop0
;        EXPORT huff_decode_loop1
;        EXPORT huff_decode_loop2
;        EXPORT huff_decode_loop3

;        EXPORT huff_block_clear
;        EXPORT huff_anotherblock
;        EXPORT huff_dc_0
;        EXPORT huff_loop
;        EXPORT huff_else
;        EXPORT huff_exit

;        EXPORT huff_zag

;        EXPORT huff_skip_anotherblock
;        EXPORT huff_skip_dc_0
;        EXPORT huff_skip_loop
;        EXPORT huff_skip_else
;        EXPORT huff_skip_exit

        GET sources.jdhuff
        END