Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

NextBASIC Inline Assembler

Write assembly language programs inline with your NextBASIC code. · By taylorza

"nrega 23" for basic-inline-asm ?

A topic by funkheld created May 26, 2024 Views: 60 Replies: 1
Viewing posts 1 to 2

Can you please also make an “nrega 45” for the ASM?

Thanks.

greeting

-------------------------

 10 RUN AT 3

  15 LOAD "bild.scr" layer

  16 LAYER 2,1

  17 REG  20,227

  18  LOAD "c:\pebibas\bildbmp.sl2" layer

  20  LAYER 2,1
  30  .asm

  40  ; org $c000

  50  ; nreg 22,50
  60  ; ret

  70  RANDOMIZE USR ($c000)

  80  GOTO 80

Developer (1 edit)

@funkheld, you can already use "nreg". Looking at your example I think the problem you might be having is that you are putting the opcodes on the left, so the assembler will treat those as labels. 

I normally put 2 spaces before the opcodes, but there should be at least one, labels must be started right up against the ';'. This is the same convention used in sjasmplus.