首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >组件16位NewLine

组件16位NewLine
EN

Stack Overflow用户
提问于 2014-09-06 22:16:15
回答 1查看 316关注 0票数 0

嗨,我正在用汇编做一个简单的Hello World程序。第16位

代码语言:javascript
复制
  MOV SI, HelloString
  CALL PrintString

  MOV SI, NewLine
  CALL PrintString
  ;New line here
  MOV SI, HelloString2
  CALL PrintString
  JMP $

  ;Write String Method {
  PrintCharacter:
  MOV AH, 0x0E
  MOV BH, 0x00
  MOV BL, 0x07
  INT 0x10
  RET
  PrintString:
  next_character:
  MOV AL, [SI]
  INC SI
  OR AL, AL
  JZ exit_function
  CALL PrintCharacter
  JMP next_character
  exit_function:
  RET
  ;} Write String Method    


  HelloString db 'Hello World', 0
  HelloString2 db 'Hi, my name is Ottovolante321', 0

  times 510 - ($-$$) db 0
  dw 0xAA55

如何在两个字符串之间包含NewLine?感谢您的关注。

EN

回答 1

Stack Overflow用户

发布于 2014-09-06 22:54:17

代码语言:javascript
复制
HelloString db 'Hello World'
            db 13,10,0
HelloString2 db 'Hi, my name is Ottovolante321'
            db 13,10,0

只需在字符串结束指示符之前插入回车符、换行符。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25701170

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档