]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/dlgbox/dbget2lines.s
Merge remote-tracking branch 'upstream/master'
[cc65] / libsrc / geos-common / dlgbox / dbget2lines.s
1 ;
2 ; Maciej 'YTM/Elysium' Witkowiak
3 ;
4 ; 25.12.99
5
6             .export DB_get2lines
7             .importzp ptr3,ptr4
8             .import popax
9
10 DB_get2lines:
11         sta ptr4                ; fetch line 2
12         stx ptr4+1
13         jsr popax
14         sta ptr3                ; fetch line 1
15         stx ptr3+1
16         ldx #ptr3
17         jsr checknull
18         ldx #ptr4
19         jmp checknull
20
21 checknull:
22         lda $0,x
23         ora $1,x
24         bne cn_end
25         lda #<nullstring
26         sta $0,x
27         lda #>nullstring
28         sta $1,x
29 cn_end: rts
30
31 .rodata
32
33 nullstring:
34         .byte 0