-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathloadprinter.inc
58 lines (55 loc) · 1.5 KB
/
loadprinter.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
; ----------------------------------------------------------------------------
; geoWrite V2.1 (C64)
; shared code for loading the printer driver
; ----------------------------------------------------------------------------
; reverse-engineered by Michael Steil, www.pagetable.com
; ----------------------------------------------------------------------------
loadPrinter:
jsr setAppDrive
ldx #0
lda PrntFilename
beq @2
LoadW r6, PrntFilename
LoadB r0L, 0
jsr swapUserZp
jsr GetFile
jsr swapUserZp
bit a9L
bpl @rts
beqx @rts
cpx #FILE_NOT_FOUND
bne @1
LoadW r5, PrntFilename
lda #<dlgbox_cant_find_printer
ldx #>dlgbox_cant_find_printer
jsr doDlgBox
ldx #$FF
@rts: rts
@1: lda #<txt_reading_printer_driver
ldy #>txt_reading_printer_driver
jmp showIOError
@2: ldx #$FF
bit a9L
bpl @rts
lda #<txt_no_printer
ldy #>txt_no_printer
jmp showError
; ----------------------------------------------------------------------------
dlgbox_cant_find_printer:
.byte DEF_DB_POS|1
.byte DBTXTSTR
.byte 16
.byte 16
.word txt_cant_find_printer
.byte DBVARSTR
.byte 16
.if LANG=LANG_DE
.byte 48
.else
.byte 32
.endif
.byte 12 ; r12
.byte OK
.byte 17
.byte 72
.byte NULL