DlgBox* with 2lines arguments will accept both "" and NULL for a blank line
git-svn-id: svn://svn.cc65.org/cc65/trunk@2107 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -499,6 +499,7 @@ GEOS application.
|
|||||||
<p>
|
<p>
|
||||||
These function show two lines of text in standard-sized DialogBox. You can read the code of
|
These function show two lines of text in standard-sized DialogBox. You can read the code of
|
||||||
pressed icon from return value. E.g. for <tt/DlgBoxYesNo/ it can only be <tt/YES/ or <tt/NO/.
|
pressed icon from return value. E.g. for <tt/DlgBoxYesNo/ it can only be <tt/YES/ or <tt/NO/.
|
||||||
|
You can pass an empty string or NULL to get a blank line.
|
||||||
|
|
||||||
<sect3>DlgBoxGetString
|
<sect3>DlgBoxGetString
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
;
|
;
|
||||||
; Maciej 'YTM/Alliance' Witkowiak
|
; Maciej 'YTM/Elysium' Witkowiak
|
||||||
;
|
;
|
||||||
; 25.12.99
|
; 25.12.99
|
||||||
|
|
||||||
@@ -8,10 +8,30 @@
|
|||||||
.importzp ptr3,ptr4
|
.importzp ptr3,ptr4
|
||||||
.import popax
|
.import popax
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
DB_get2lines:
|
DB_get2lines:
|
||||||
sta ptr4
|
sta ptr4 ; fetch line 2
|
||||||
stx ptr4+1
|
stx ptr4+1
|
||||||
jsr popax
|
jsr popax
|
||||||
sta ptr3
|
sta ptr3 ; fetch line 1
|
||||||
stx ptr3+1
|
stx ptr3+1
|
||||||
rts
|
ldx ptr3
|
||||||
|
jsr checknull
|
||||||
|
ldx ptr4
|
||||||
|
jmp checknull
|
||||||
|
|
||||||
|
checknull:
|
||||||
|
lda $0,x
|
||||||
|
ora $1,x
|
||||||
|
bne cn_end
|
||||||
|
lda #<nullstring
|
||||||
|
sta $0,x
|
||||||
|
lda #>nullstring
|
||||||
|
sta $1,x
|
||||||
|
cn_end: rts
|
||||||
|
|
||||||
|
.rodata
|
||||||
|
|
||||||
|
nullstring:
|
||||||
|
.byte 0
|
||||||
|
|||||||
Reference in New Issue
Block a user