/[projet1]/users/barnsey123/HNEFATAFL/text.s
Defence Force logotype

Contents of /users/barnsey123/HNEFATAFL/text.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1057 - (show annotations)
Tue Dec 24 13:52:15 2013 UTC (6 years ago) by barnsey123
File size: 2204 byte(s)
v0.104 new loader sequence...problem detected in subcanbetaken2 (not fixed)
1 ;_hiresasm
2 ;.(
3 ; jsr _hires
4 ; rts
5 ;.)
6
7 _playertext .dsb 2
8 _turntext .byt " TURN: #$%&:MOVE CURSOR",10,"X:SELECT PIECE P:POSSIBLE MOVES",10,"TURN: REMAINING: ",0
9 _pressakey .byt " ()( PRESS A KEY )()",0
10 ;
11 ; Simply erases the three lines of TEXT at the bottom of the HIRES screen
12 ; It's possible to change the INK color in the code iself.
13 ;
14 _erasetextarea
15 .(
16 lda #5 ; Purple color
17 ;ldx #40*3
18 ldx _erasetext
19 loop_erase
20 sta $bb80+25*40-1,x
21 dex
22 bne loop_erase
23
24 rts
25 .)
26
27
28 ;
29 ; _message=source message
30 ; y=screen offset (2, 42, 82)
31 _printline
32 .(
33 ldx #255
34 loop_draw
35 inx
36
37 .byt $BD ; lda $1234,x
38 +_message
39 .word $1234
40
41 beq end ; 0
42 cmp #10 ; \n
43 beq next_line
44 sta $bb80+25*40,y
45 iny
46 bne loop_draw
47
48 next_line
49 cpy #39
50 bcs last_line
51 ldy #42
52 bne loop_draw
53 last_line
54 ldy #82
55 bne loop_draw
56
57 end
58 rts
59 .)
60
61
62 ;
63 ; Usage: Set the adress of the string to print in the _message variable
64 ; Note: The string should be terminated by a 0
65 ;
66 _printmessage
67 .(
68 ; Erase the 3 lines of text
69 jsr _erasetextarea
70
71 ldy #2
72 jmp _printline
73 .)
74
75
76 ; char turntext[]=" TURN: USE CURSOR KEYS.\nX=SELECT PIECE P=POSSIBLE MOVES";
77 ; printf("%c\n\n\n%s%s%c",19,playertext,turntext,19);
78
79 _printturnprompt
80 .(
81 ; Erase the 3 lines of text
82 jsr _erasetextarea
83
84 ; First line of text
85 lda _playertext+0
86 sta _message+0
87 lda _playertext+1
88 sta _message+1
89
90 ldy #2
91 jsr _printline
92
93 ; Second line of text
94 lda #<_turntext
95 sta _message+0
96 lda #>_turntext
97 sta _message+1
98 jmp _printline
99 .)
100
101 _printturncount
102 .(
103 lda _huns ; hundreds
104 sta $bfc0
105 lda _thor ; tens
106 sta $bfc1
107 lda _odin2 ; units
108 sta $bfc2
109 rts
110 .)
111
112 _printremaining
113 .(
114 lda _huns ; hundreds
115 sta $bfd8
116 lda _thor ; tens
117 sta $bfd9
118 lda _odin2 ; units
119 sta $bfda
120 rts
121 .)
122
123 _flashon
124 .(
125 ldy #42 // screen offset
126 lda #<_pressakey
127 sta _message+0
128 lda #>_pressakey
129 sta _message+1
130 jsr _printline
131 lda #1 // foreground=red
132 sta $bf91
133 lda #140 // flashing text
134 sta $bf92
135 .)
136
137 _colorturn
138 .(
139 ;lda #0 ; black background
140 ;sta $bfb8
141 lda _y ; color foreground
142 sta $bfb9
143 .)

  ViewVC Help
Powered by ViewVC 1.1.26