Changeset 55 for trunk/page00/display.asm
- Timestamp:
- 10/11/09 23:33:32 (3 years ago)
- Files:
-
- 1 modified
-
trunk/page00/display.asm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/page00/display.asm
r49 r55 5 5 PUBLIC _LCD_COMMAND,SetXAutoIncrementMode,SetYAutoIncrementMode,IPutSB,PutMap,ClrScrnFull,ClrTxtShd 6 6 PUBLIC saveTR,restoreTR,showCursor,CursorOff,CursorOn,hideCursor,RunIndicOn,IPutC,_LCD_DRIVERON 7 EXTERN IsAtEditTail,IsAtBtm,LCDDelay,ATimes16,NZIf83Plus 7 PUBLIC RestoreTextShadow,rstrpartialWin,savepartialWin,PutPS 8 EXTERN IsAtEditTail,IsAtBtm,LCDDelay,ATimes16,NZIf83Plus,_GetCharacterBitmap 8 9 9 10 include "includes\os2.inc" 11 12 PutPS: 13 ld b,(hl) 14 $$: inc hl 15 ld a,(hl) 16 call PutC 17 djnz $B 18 ret 19 20 RestoreTextShadow: 21 ld hl,0 22 ld (curRow),hl 23 ld hl,textShadow 24 ld b,127 25 $$: ld a,(hl) 26 inc hl 27 call IPutC 28 djnz $B 29 ld a,(hl) 30 call PutMap 31 rstrpartialWin: 32 ld hl,(textShadCur) 33 ld (curRow),hl 34 ld a,(textShadAlph) 35 ld (flags+shiftFlags),a 36 ld a,(textShadIns) 37 and 0EFh 38 ld hl,flags+textFlags 39 or (hl) 40 ld (hl),a 41 ret 42 savepartialWin: 43 ld hl,(curRow) 44 ld (textShadCur),hl 45 ld a,(winTop) 46 ld (textShadTop),a 47 ld a,(flags+shiftFlags) 48 ld (textShadAlph),a 49 ld a,(flags+textFlags) 50 and 10h 51 ld (textShadIns),a 52 ret 10 53 11 54 _LCD_DRIVERON: … … 83 126 jr endTR 84 127 85 PutMap:86 push hl87 ld hl,(curRow)88 push hl89 call PutC90 pop hl91 ld (curRow),hl92 pop hl93 ret94 95 128 restoreTR: 96 129 bit indicInUse,(iy+indicFlags) … … 255 288 256 289 EraseEOL: 257 ld hl,(curRow) 290 push af 291 push bc 292 push de 258 293 push hl 259 294 ld a,(curCol) 295 push af 296 sub 16 297 jr nc,EraseEOL_1 298 neg 260 299 ld b,a 261 ld a,16 262 sub b 263 ld b,a 264 $$: ld a,' ' 265 push bc 266 call PutC 267 pop bc 300 ld a,' ' 301 dec b 302 jr z,EraseEOL_2 303 $$: call PutC 268 304 djnz $B 269 pop hl 270 ld (curRow),hl 271 ret 272 273 ;TODO: get this using a built-in font table instead of this boot code hack 305 EraseEOL_2: 306 call PutMap 307 ; ei 308 EraseEOL_1: 309 pop af 310 ld (curCol),a 311 pop hl 312 pop de 313 pop bc 314 pop af 315 ret 316 317 newLine: 318 push af 319 ld a,(curRow) 320 inc a 321 ld (curRow),a 322 xor a 323 ld (curCol),a 324 pop af 325 ret 326 274 327 PutC: 328 push af 329 push hl 330 cp 0D6h 331 jr nz,$F 332 call EraseEOL 333 call newLine 334 ld a,(winBtm) 335 ld l,a 336 ld a,(curRow) 337 cp l 338 jr nc,PutC_Done 339 ld a,3Ah 340 $$: call PutMap 341 res 0,(iy+8) 342 ld hl,curCol 343 inc (hl) 344 ld a,(hl) 345 cp 16 346 call nc,newLine 347 PutC_Done: 348 pop hl 349 pop af 350 ret 351 352 PutMap: 275 353 push af 276 354 push bc … … 282 360 call GetTextShadowOffset 283 361 ld (hl),a 284 $$: ld b,a 362 $$: or a 363 jr z,$F 364 cp 0F5h 365 jr c,PutMap_1 366 $$: ld a,0D0h 367 PutMap_1: 368 ld l,a 369 ld h,0 370 add hl,hl 371 add hl,hl 372 add hl,hl 373 call _GetCharacterBitmap 374 push hl 375 pop ix 376 ld a,(curRow) 377 add a,a 378 add a,a 379 add a,a 380 add a,80h 381 ld (curXRow),a 382 ld a,(curCol) 383 and 1Fh 384 add a,20h 385 ld b,a 386 xor a 387 call LCDDelay 388 out (LCDinstPort),a 389 ld a,(curXRow) 390 call SetLCDRow 391 call SetXAutoIncrementMode 392 ld a,b 393 call LCDDelay 394 out (LCDinstPort),a 395 ld b,8 396 PutMap_Loop1: 397 xor a 398 dec b 399 jr z,$F 400 ld a,(ix+0) 401 inc ix 402 $$: inc b 403 sla a 404 bit textInverse,(iy+textFlags) 405 jr z,PutMap_3 406 xor 3Eh 407 PutMap_4:push af 408 ld a,(curCol) 409 and 1Fh 410 jr z,PutMap_2 411 add a,1Fh 412 call LCDDelay 413 out (LCDinstPort),a 414 call SetLCDRow_1 415 or 1 416 bit 0,(iy+8) 417 jr z,$F 418 and 3Eh 419 $$: call LCDDelay 420 out (LCDdataPort),a 421 ld a,(curCol) 422 and 1Fh 423 add a,20h 424 call LCDDelay 425 out (LCDinstPort),a 426 call SetLCDRow_2 427 PutMap_2: 428 pop af 429 jr PutMap_5 430 PutMap_3: 431 bit 0,(iy+8) 432 jr nz,PutMap_4 433 PutMap_5: 434 call LCDDelay 435 out (LCDdataPort),a 436 djnz PutMap_Loop1 437 ld a,1 438 call LCDDelay 439 out (LCDinstPort),a 440 COMMENT ~ 441 ld b,a 285 442 in a,(6) 286 443 push af … … 318 475 ld a,b 319 476 out (6),a 477 ~ 320 478 pop ix 321 479 pop hl 322 480 pop de 323 481 pop bc 482 pop af 483 ret 484 SetLCDRow_1: 485 call LCDDelay 486 in a,(LCDdataPort) 487 call LCDDelay 488 in a,(LCDdataPort) 489 SetLCDRow_2: 490 push af 491 ld a,(curXRow) 492 add a,8 493 sub b 494 call SetLCDRow 495 call SetXAutoIncrementMode 324 496 pop af 325 497 ret
