1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 19:29:37 +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
.importzp tmp2
.ifdef DYNAMIC_DD
.import __defdev
.endif
.endif
.importzp tmp3,ptr4,sp
.import _strupr,subysp
@ -82,7 +80,7 @@ loop2: lda (ptr4),y
cmp #1 ; was device present in passed string?
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
ldy #3
@ -91,15 +89,11 @@ loop2: lda (ptr4),y
lda #':'
sta (sp),y ; insert ':'
dey
.ifdef DYNAMIC_DD
lda __defdev+1
.else
lda #'0'+DEFAULT_DEVICE
.endif
sta (sp),y ; insert device number
dey
lda #'D'
sta (sp),y ; insert 'D'
lda __defdev
sta (sp),y ; insert device name (normally 'D' or 'H')
hasdev2:
.endif
; uppercase the temp. filename