bmpDst:
  rb bmp32.szStruc + width*height*4      ;reserve space
  bmp32 bmpDst width height              ;write template


bmpFont:
.WIDTH  = 24
.HEIGHT = 32
.SIZE   = bmp32.szStruc + .WIDTH*256 * .HEIGHT *4
  rb .SIZE

  .file_buf: rb 512
  .file_arg: ui32 .WIDTH,.HEIGHT
  .file_fmt: ub '../inc/bitmap/fonts/font%ux%uX256.win1251.bmp',0
  printfA(.file_buf 512 .file_fmt .file_arg)

  ReadFileA(bmpFont .file_buf 0 .SIZE)   ;read font from disk
  bmp32.pqFlipY(bmpFont)                 ;see bmp32.inc for disorder description


msg1:
  ub 'www.board.FlatAssembler.net',10,\
     'LF test OK                 ',13,\
     'CR test OK                 ',10,\
     '³ ;)              ',0

  bmp32.flush           bmpDst 0x00'00'00

  bmp32.pqFont.TextOut  bmpDst  16                   180 bmpFont 0x00'00'ff  msg1      03
  bmp32.pqFont.TextOut  bmpDst (16+03*bmpFont.WIDTH) 180 bmpFont 0x00'ff'00 (msg1+03)  07
  bmp32.pqFont.TextOut  bmpDst (16+10*bmpFont.WIDTH) 180 bmpFont 0x00'ff'ff (msg1+10)  17

  bmp32.pqFont.TextOut  bmpDst 16 128 bmpFont 0xff'ff'00 msg1 ($-msg1)

  bmp32.screen          bmpDst
