1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-28 06:30:16 +00:00

don't hardcode 'D' as device name, use __defdev

git-svn-id: svn://svn.cc65.org/cc65/trunk@4495 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cpg 2009-11-26 18:47:14 +00:00
parent 644d44bcae
commit e65719bf98

View File

@ -20,9 +20,7 @@
.ifdef DEFAULT_DEVICE .ifdef DEFAULT_DEVICE
.importzp tmp2 .importzp tmp2
.ifdef DYNAMIC_DD
.import __defdev .import __defdev
.endif
.endif .endif
.importzp tmp3,ptr4,sp .importzp tmp3,ptr4,sp
.import _strupr,subysp .import _strupr,subysp
@ -82,7 +80,7 @@ loop2: lda (ptr4),y
cmp #1 ; was device present in passed string? cmp #1 ; was device present in passed string?
beq hasdev2 ; yes, don't prepend something beq hasdev2 ; yes, don't prepend something
inc tmp3 ; no, prepend "D:" inc tmp3 ; no, prepend "D:" (or other device)
inc tmp3 ; adjust stack size used inc tmp3 ; adjust stack size used
inc tmp3 inc tmp3
ldy #3 ldy #3
@ -91,15 +89,11 @@ loop2: lda (ptr4),y
lda #':' lda #':'
sta (sp),y ; insert ':' sta (sp),y ; insert ':'
dey dey
.ifdef DYNAMIC_DD
lda __defdev+1 lda __defdev+1
.else
lda #'0'+DEFAULT_DEVICE
.endif
sta (sp),y ; insert device number sta (sp),y ; insert device number
dey dey
lda #'D' lda __defdev
sta (sp),y ; insert 'D' sta (sp),y ; insert device name (normally 'D' or 'H')
hasdev2: hasdev2:
.endif .endif
; uppercase the temp. filename ; uppercase the temp. filename